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
const expInDays = dayjs('31-DEC-50').diff(dayjs(), 'day');
Above code considers year as 1950 instead of 2050. same code with 31-DEC-49 considers year as 2049.
DD-MMM-YY format days difference calculation works fine till 2049.
Expected behavior
It should calculate days correctly.
Information
Day.js Version 1.11.13
OS: Windows
Browser Chrome
The text was updated successfully, but these errors were encountered:
gmprabu
changed the title
Days difference calculation is wrong if the year format is more than 2049
Days difference calculation is wrong if the date is format DD-MMM-YY and year more than 49(2049)
Apr 2, 2025
gmprabu
changed the title
Days difference calculation is wrong if the date is format DD-MMM-YY and year more than 49(2049)
Days difference calculation is wrong if the date format is DD-MMM-YY and year is more than 49(2049)
Apr 2, 2025
Describe the bug
const expInDays = dayjs('31-DEC-50').diff(dayjs(), 'day');
Above code considers year as 1950 instead of 2050. same code with 31-DEC-49 considers year as 2049.
DD-MMM-YY format days difference calculation works fine till 2049.
Expected behavior
It should calculate days correctly.
Information
The text was updated successfully, but these errors were encountered: