Skip to content

Instantly share code, notes, and snippets.

@EpokK
Created May 7, 2013 12:29
Show Gist options
  • Save EpokK/5532199 to your computer and use it in GitHub Desktop.
Save EpokK/5532199 to your computer and use it in GitHub Desktop.
dateString
// Get date string for today's date (e.g. '2011-01-01')
function dateString () {
var d = new Date(Date.now() - 5*60*60*1000);
return d.getUTCFullYear() + '-'
+ (d.getUTCMonth() + 1) + '-'
+ d.getDate();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment