iamkun / iamkun/dayjs

adding duration created with object fail since 1.11.9

Open
#2,815 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
dayjs().add(dayjs.duration({weeks: 1})) => today

**Expected behavior**
dayjs().add(dayjs.duration({weeks: 1})) => today + 7 days

**Information**
- Day.js Version [e.g. v1.11.13]
- Day.js Version 1.11.7 was OK

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported difference between Day.js 1.11.7 and the later version using dayjs().add(dayjs.duration({weeks: 1})). Trace the duration-object handling and identify the relevant existing tests, then confirm that a one-week duration advances the date by seven days without breaking other duration inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.