Incorrect Day of Year
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The `dayOfYear()` when called for the last day i.e. 31st Dec, of a leap year returns `365` as output.
**Expected behavior**
The `dayOfYear()` when called for last day of a leap year should return `366` as output.
**Information**
- Day.js Version: v1.10.4
- OS: macOS
- Browser: N/A
- Time zone: UTC+05:30 IST (Indian Standard Time)]

Contributor guide
Research direction
Start by locating the dayOfYear() implementation and reproduce the reported case for 31 December in a leap year. The issue is done when that case returns 366 while the existing day-of-year behavior remains correct.
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
- 45/100