Uses the Moment.js library to work with date and time code example
Example 1: moment diff
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days') // 1
Example 2: momentjs docs
npm install moment
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days') // 1
npm install moment