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
Describe the bug
The result of the diff method for the "day" unit is wrong around Oct 31, 2022 in European time zones. The result seems to ignore the existence of the 31st of Oct.
For example the diff in days between Nov 1 and Oct 30 is 1 (when it should be 2) and the problem occurs for dates further apart than that (one day less than expected). The problem does not occur in the year 2020 (only other year I tested).
I think we have seen this as well yesterday, we have a system that shows when stats arrive with us and its missed the 31 oct/ 1st nov in effect, its shows the last date stats arrived but did "nothing" in effect for if the stats arrived last on 1st nov:
where as its back to working today, as the last stats in date is the 2nd november now:
our developer in India also saw it , as in no date showing and I'm in the UK
Oct 29, 2022 will be UTC+2. And Nov 1, 2022 will be UTC+1. so the result of diff will be about 71/24 ≈ 2.958333.
dayjs('2022-11-01T00:00:00Z').diff('2022-10-29T00:00:00Z', 'day', true) = 2.958333.
Describe the bug
The result of the
diff
method for the"day"
unit is wrong around Oct 31, 2022 in European time zones. The result seems to ignore the existence of the 31st of Oct.For example the diff in days between Nov 1 and Oct 30 is 1 (when it should be 2) and the problem occurs for dates further apart than that (one day less than expected). The problem does not occur in the year 2020 (only other year I tested).
Here is a fiddle link: https://jsfiddle.net/henrywoody/9gsdpyb8/5/
I tested in the following time zones:
Pretty stumped by this one.
Expected behavior
Expected day diff between Nov 1 and Oct 30 to be 2.
Information
The text was updated successfully, but these errors were encountered: