.format('Y') returns timezone offset instead of ISO 8601 year
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
DayJS is supposed to be fully compatible with MomentJS
```
var d = require('dayjs')
d().format('Y') // returns '+0200' instead of '2021'
```
[Moment docs for .format](https://momentjs.com/docs/#/displaying/format/)
On DayJS's [docs](https://day.js.org/docs/en/display/format) the single `Y` is not documented
Contributor guide
Research direction
Start with DayJS's .format API and compare the single-Y behavior with the linked Moment.js format documentation. Check the existing formatting tests, then verify that .format('Y') returns the ISO 8601 year such as '2021' rather than a timezone offset.
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
- 48/100