moment.js 两个时间段的截取
var a = moment([2008, 9, 29]);
var b = moment([2007, 0, 10]);
console.log(a.diff(b,'months'));//‘months’//代表将毫秒数转化为月数,days//将毫秒数转化为天数
var a = moment([2008, 9, 29]);
var b = moment([2007, 0, 10]);
console.log(a.diff(b,'months'));//‘months’//代表将毫秒数转化为月数,days//将毫秒数转化为天数