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
{{ message }}
Repository navigation
[Bug]: ISOWEEKNUM() returns 53 for late-December days that belong to week 1 of the next year #1882
=ISOWEEKNUM(DATE(2024,12,30)) returns 53. 30 December 2024 is a Monday and starts ISO week 1 of 2025, so Excel, Google Sheets and LibreOffice return 1. 2024 has only 52 ISO weeks. The same happens for 31 December 2024, for 29 to 31 December 2025, and in other years where the last days of December fall in the new year's first week.
Dates at the start of January that belong to the previous year's last week are already handled (ISOWEEKNUM(DATE(2021,1,1)) = 53 is correct). isoweeknumCore in DateTimePlugin.ts (develop 5a6eb09) recurses when the result is 0, but never checks whether a late-December date falls on or after the first Monday of next year's week 1.
This shows up in weekly reports around New Year: the last days of December get counted as week 53 of a year that doesn't have one.
Activity
jayhemnani9910 commentedon Nov 29, 2026
@sequba friendly ping on this and #1881. Are these worth keeping open, or should I close them?