Last active
June 16, 2016 09:06
-
-
Save ohaal/6ce69d09e4e44782b322 to your computer and use it in GitHub Desktop.
Simple JS Timestamp String
This file contains hidden or 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
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