Last active
January 18, 2018 06:38
-
-
Save wiyoe/5e0d0592d47ac29db0baf2cd888874c3 to your computer and use it in GitHub Desktop.
Javascript Timestamp(seconds)
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
| var d = new Date(); | |
| var seconds = Math.round(d.getTime() / 1000); // 10 digit | |
| // Same as moment.js | |
| moment().unix(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment