Created
October 30, 2018 01:31
-
-
Save adamcrampton/64174e038fb74bcd73e1f330859df638 to your computer and use it in GitHub Desktop.
moment.js tester
This file contains 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
// Requires moment.js | |
const moment = require('moment'); | |
// Remove date parameter from moment method to get "now" | |
var formattedDate = moment('2018-10-29 13:57:37').format('h:mm A'); | |
alert(formattedDate); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment