moment current date and time code example
Example 1: format a date moment
moment(testDate).format('MM/DD/YYYY');
Example 2: how to get current time using moment
var startDate = moment().subtract(1, 'days'); //one day before the current time
moment(testDate).format('MM/DD/YYYY');
var startDate = moment().subtract(1, 'days'); //one day before the current time