Created
February 9, 2015 19:53
-
-
Save tonyfast/7b7df83b7b72a480f5e9 to your computer and use it in GitHub Desktop.
MomentJS + UTC
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
| <script src="//cdn.jsdelivr.net/g/momentjs"></script> | |
| <script> | |
| time = 'Wed May 29 20:22:58 UTC 2013'; | |
| t = moment().utc( time ) | |
| console.log('The formatted time is : ', t.format('dddd Do YY h:mm:ss a')); | |
| console.log('The formatted time is : ', t.fromNow()); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment