Skip to content

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

@datastructurey

Description

@datastructurey

Describe the bug
Subtracting one week from January 4, 2026, gives the week number as the first week of 2025, which is incorrect.

dayjs('2016-01-04').subtract(1, 'w').format('YYYY年w周') // 2025年1周

Expected behavior
The correct answer should be the 53rd week of 2025.

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions