Last active
November 7, 2021 15:31
-
-
Save wiyoe/8d7d65c40583564e61ad745d256dfa5e to your computer and use it in GitHub Desktop.
Moment.js convert Unix epoch time to human readable time
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
| moment("2017-12-27", "YYYY-MM-DD").unix(); // 1514322000 | |
| moment.unix(1514322000).format("DD-MM-YYYY"); // seconds | |
| moment(1318781876406).format("DD-MM-YYYY H:m:s"); // milliseconds | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment