Skip to content

Instantly share code, notes, and snippets.

@joeegan
Created April 27, 2011 14:25
Show Gist options
  • Select an option

  • Save joeegan/944332 to your computer and use it in GitHub Desktop.

Select an option

Save joeegan/944332 to your computer and use it in GitHub Desktop.
formatted date
var date = new Date();
var minutes = date.getMinutes();
if (minutes < 10) {
minutes = "0" + minutes
}
date = date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' ' + date.getHours() + ':' + minutes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment