Created
May 31, 2014 22:37
-
-
Save maxkrieger/617a71e1e4c08dcc1bb0 to your computer and use it in GitHub Desktop.
Get a handy Date() array!
This file contains 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
// returns: [day, month, year] | |
function dateArr(){ | |
var cDate = new Date(); | |
var cArr = []; | |
cArr.push(cDate.getDate()); | |
cArr.push(cDate.getMonth()); | |
cArr.push(cDate.getYear()); | |
return cArr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment