get current time moment code example
Example 1: moment js print date
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
Example 3: moment format heure
var time = "15:30:00";
var formatted = moment(time, "HH:mm:ss").format("LT");
console.log(formatted);
//it will return 3:30 PM