Answer the question
In order to leave comments, you need to log in
How to find the number of days between two dates?
There are two dates, how to find out the number of days between them? You can use momentJS. Thank you.
Answer the question
In order to leave comments, you need to log in
var dateB = moment('2014-11-11');
var dateC = moment('2014-10-11');
console.log('Разница в ', dateB.diff(dateC), 'миллисекунд');
console.log('Разница в ', dateB.diff(dateC, 'days'), 'дней');
console.log('Разница в ', dateB.diff(dateC, 'months'), 'месяцев');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question