0
var firstDate=moment('Sat Jul 30 2016 00:00:00 GMT+0530 (India Standard Time)');
var secondDate=moment('Fri Jul 29 2016 10:56:39 GMT+0530 (India Standard Time)');
console.log(firstDate.diff(secondDate,'days'));
予想される出力:1のJavaScript:モーメント関数diffが間違っ日差を与える
実際の出力:-0
なぜこれが起こっている任意の理由は?
* secondDate *は* firstDate *の前にあるので、-1が必要です。 – RobG