Days difference calculation is wrong if the date format is DD-MMM-YY and year is more than 49(2049)
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**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
Contributor guide
Assessment
This issue has not been assessed yet.