iamkun / iamkun/dayjs

The week number obtained after subtracting one week from January 4, 2026 is incorrect.

Open
#2,987 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**
Subtracting one week from January 4, 2026, gives the week number as the first week of 2025, which is incorrect.
```js
dayjs('2016-01-04').subtract(1, 'w').format('YYYY年w周') // 2025年1周
```

**Expected behavior**
The correct answer should be the 53rd week of 2025.
```js
dayjs('2016-01-04').subtract(1, 'w').format('YYYY年w周') // 2015年53周
```
**Information**
- Day.js Version 1.11.19
- OS: macOS Sequoia 15.7.2
- Browser chrome 143.0.7499.170
- Time zone: UTC/GMT+08:00(Asia/Shanghai)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.