moment format iso code example
Example 1: how to get iso date with moment
moment().toISOString();
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 date add
var new_date = moment(startdate, "DD-MM-YYYY").add(5, 'days');
Example 5: moment.js format
moment().format('MMMM Do YYYY, h:mm:ss a');
moment().format('dddd');
moment().format("MMM Do YY");
moment().format('YYYY [escaped] YYYY');
moment().format();