📅  最后修改于: 2022-03-11 15:03:52.099000             🧑  作者: Mango
const dateB = moment('2014-11-11');
const dateC = moment('2014-10-11');
console.log('Difference is ', dateB.diff(dateC), 'milliseconds');
console.log('Difference is ', dateB.diff(dateC, 'days'), 'days');
console.log('Difference is ', dateB.diff(dateC, 'months'), 'months');