Skip to content

Instantly share code, notes, and snippets.

@ohaal
Last active June 16, 2016 09:06
Show Gist options
  • Save ohaal/6ce69d09e4e44782b322 to your computer and use it in GitHub Desktop.
Save ohaal/6ce69d09e4e44782b322 to your computer and use it in GitHub Desktop.
Simple JS Timestamp String
function getTimestamp() {
return (new Date).toString().match(/\w{3} \d{1,2} \d{4} \d{1,2}:\d{2}:\d{2}/)[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment