Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bookmarklet for converting UNIX/POSIX timestamp to date and time
javascript:(function(a){var b=parseInt(a.replace(/[\s|,]/g,""),10);alert(isNaN(b)?'"'+a+"\" doesn't look like a UNIX timestamp.":'"'+a+'" is\n'+new Date(b*(b>1e12?1:1e3)));})(window.getSelection().toString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.