moment js on nodejs code example
Example 1: format a date moment
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