new moment date code example
Example 1: moment to date
moment().toDate();
Example 2: moment add seconds
var travelTime = moment().add(642, 'seconds').format('hh:mm A');
var travelTime = moment().add(11, 'minutes').format('hh:mm A');
var travelTime = moment().add(2, 'hours').format('hh:mm A');
Example 3: format a date moment
moment(testDate).format('MM/DD/YYYY');
Example 4: moment js get french time 20:00:00
moment().format();
moment().format("dddd, MMMM Do YYYY, h:mm:ss a");
moment().format("ddd, hA");
moment('gibberish').format('YYYY MM DD');