compare date time moment js code example
Example 1: moment js print date
moment(testDate).format('MM/DD/YYYY');
Example 2: moment diff
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days') // 1
moment(testDate).format('MM/DD/YYYY');
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days') // 1