You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The week of the year is wrongly computed. Here is an example:
importdayjsfrom'dayjs'importweekOfYearfrom'dayjs/plugin/weekOfYear'dayjs.extend(weekOfYear)console.log(dayjs('2024-12-28').week())// ✅console.log(dayjs('2024-12-29').week())// ❌ (says 1 but is 53)console.log(dayjs('2024-12-30').week())// ❌ (says 1 but is 53)console.log(dayjs('2024-12-31').week())// ❌ (says 1 but is 53)console.log(dayjs('2025-01-01').week())// ✅
Expected behavior
The weeks for the 29, 30 and 31 of december should be 53, and not 1, as the method returns.
Information
DayJS version: 1.11.13
OS: MacOS
Browser: Chrome, also command line: bun
Time zone: CET
The text was updated successfully, but these errors were encountered:
According to the weekYear plugin's tests, this is the expected behavior for this function. The function documentation might need an update on this topic.
Please have a look here:
Describe the bug
The week of the year is wrongly computed. Here is an example:
Expected behavior
The weeks for the 29, 30 and 31 of december should be 53, and not 1, as the method returns.
Information
The text was updated successfully, but these errors were encountered: