dayjs.duration(y.diff(x)) The year, month and day in the object are not accurate
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
JAVA:

Javascript-dayjs:


Why is the calculation of months and days like this?
**Expected behavior**
Hope to get the right result
**Information**
- Day.js Version [v1.8.36]
- OS: [window]
- Browser [chrome 85]
- Time zone: [Mon Sep 21 2020 17:47:43 GMT+0800 (中国标准时间)]
Contributor guide
Research direction
No source file or test is named. First reproduce dayjs.duration(y.diff(x)) with Day.js v1.8.36 and compare its year, month, and day values with the Java result shown in the issue; clarify the intended calendar semantics before locating the duration and diff tests. Done means the expected component values are defined and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100