Skip to content

Instantly share code, notes, and snippets.

@maxkrieger
Created May 31, 2014 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxkrieger/617a71e1e4c08dcc1bb0 to your computer and use it in GitHub Desktop.
Save maxkrieger/617a71e1e4c08dcc1bb0 to your computer and use it in GitHub Desktop.
Get a handy Date() array!
// 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