convert to momentjs code example
Example 1: moment to javascript date
let now = moment()
let now = now.toDate()
Example 2: moment diff
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days') // 1
let now = moment()
let now = now.toDate()
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days') // 1