wrong behavior of isoWeekday()
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
`dayjs('random srting').isoWeekday()`
returns `7`
**Expected behavior**
It should returns `NaN` (as it do `dayjs('random srting').day()`)
**Information**
- Day.js Version [v1.10.7]
- OS: [linux Mint 20.2]
- Browser [chrome 92.0.4515.159]
- Time zone: [GMT+0300 (Eastern European Summer Time))]
Contributor guide
Research direction
Start by reproducing the two expressions shown in the issue and inspect the isoWeekday() entry point alongside day(). Add a regression test covering an invalid date and verify that isoWeekday() returns NaN, matching the reported expected behavior.
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
- Clearly specified
- Newbie friendliness
- 48/100