moment js get time now code example
Example 1: moment js from now
moment(date).fromNow();
Example 2: moment js print date
moment(testDate).format('MM/DD/YYYY');
Example 3: how to get current time using moment
var startDate = moment().subtract(1, 'days'); //one day before the current time
Example 4: moment get day
var check = moment(n.entry.date_entered, 'YYYY/MM/DD');
var month = check.format('M');
var day = check.format('D');
var year = check.format('YYYY');