Initial git
This commit is contained in:
16
playground/moment-examples.js
Normal file
16
playground/moment-examples.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var moment = require('moment');
|
||||
|
||||
console.log(moment().format());
|
||||
|
||||
// January 1st 1970 @ 12:00am -> 0
|
||||
// January 1st 1970 @ 12:01am -> -60
|
||||
|
||||
var now = moment();
|
||||
console.log('Current timestamp', now.unix());
|
||||
|
||||
var timestamp = 1459111648;
|
||||
var currentMoment = moment.unix(timestamp);
|
||||
console.log('current moment', currentMoment.format('MMM D, YY @ h:mm a'));
|
||||
|
||||
// January 3rd, 2016 @ 12:13 AM
|
||||
console.log('current moment', currentMoment.format('MMMM Do, YYYY @ h:mm A'));
|
||||
Reference in New Issue
Block a user