Answers for "diff of two dates in moment"

4

moment date difference in days

moment(new Date()).diff(moment(new Date()), 'days') // 0
Posted by: Guest on March-02-2021
1

compare two dates using moment

moment('2010-10-20').isAfter('2010-01-01', 'year'); // false
moment('2010-10-20').isAfter('2009-12-31', 'year'); // true
Posted by: Guest on August-24-2020

Code answers related to "diff of two dates in moment"

Code answers related to "Javascript"

Browse Popular Code Answers by Language