Skip to content

Instantly share code, notes, and snippets.

@alexhidalgo
Created February 28, 2015 23:51
Show Gist options
  • Save alexhidalgo/7d00e5a9290431441bb0 to your computer and use it in GitHub Desktop.
Save alexhidalgo/7d00e5a9290431441bb0 to your computer and use it in GitHub Desktop.
Date only timeStamp()
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, and day
var date = [ now.getMonth() + 1, now.getDate(), now.getFullYear() ];
// Return the formatted string
return date.join("/") + suffix;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment