You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
example 1:
var a = moment([2024, 2, 23]);
var b = moment([2023, 2, 24]);
console.log(a.diff(b, 'days') ); Output : 365 example 2:
var a = moment([2024, 2, 24]);
var b = moment([2024, 2, 23]);
console.log(a.diff(b, 'days') ); Output : 1
As we see in example 2, this is not including the both dates for diff in term of days. So ideally in first example, it should give 364(5+31+30+31+30+31+31+30+31+30+31+31+22) days.
The text was updated successfully, but these errors were encountered:
example 1:
var a = moment([2024, 2, 23]);
var b = moment([2023, 2, 24]);
console.log(a.diff(b, 'days') );
Output : 365
example 2:
var a = moment([2024, 2, 24]);
var b = moment([2024, 2, 23]);
console.log(a.diff(b, 'days') );
Output : 1
As we see in example 2, this is not including the both dates for diff in term of days. So ideally in first example, it should give 364(5+31+30+31+30+31+31+30+31+30+31+31+22) days.
The text was updated successfully, but these errors were encountered: