dayjs ctor casts string ID value into Date now or Date with 8590 year...
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I have value: any;
It cointains string '859100000000000001'.
Calling dayjs(value).isValid() returns true. The cause of proble, that dayjs parsed it as:

I suppose bug in the parseDate method. Fiddle example where it returns new Date() for this value:
https://jsfiddle.net/c83kadq2/1/
**Expected behavior**
dayjs('859100000000000001').isValid() returns false.
**Information**
- Day.js Version ^1.11.5
- OS: Windows 10 21H2
- Browser Microsoft Edge Version 111.0.1661.44
- Time zone: GMT+1 Prague
Contributor guide
Research direction
Start by reproducing the linked JSFiddle for dayjs('859100000000000001') and inspect the parseDate method. Confirm that the value is currently treated as a valid Date, then verify that isValid() returns false for this input without changing normal date parsing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100