Created
February 28, 2015 23:51
-
-
Save alexhidalgo/7d00e5a9290431441bb0 to your computer and use it in GitHub Desktop.
Date only timeStamp()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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