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 getWeekOfYear function is simply counting the week number and not using ISO standard week number. This causes the incorrect week number to be shown when week numbers are displayed. For example, the last week of 2024 beginning on 30 December should be ISO week 1 of 2025 and not week 53 of 2024. Because of this, the week numbers for 2025 are off by one.
It would be nice if the getWeekOfYear used the ISO week, but if the current calculation is needed for other calendars or use cases, perhaps adding an option to useISOWeekNumber would work, as well, so that consumers of the library can choose.
See '53' as the week number displayed next to the last week of 2024
Expected behavior
I expect '1' to show as the week number because that would be the correct ISO week number for the last week of December 2024/first week of January 2025.
Screenshots
Desktop:
OS: Ubuntu
Browser Chrome
Version 24.04
The text was updated successfully, but these errors were encountered:
Describe the bug
The getWeekOfYear function is simply counting the week number and not using ISO standard week number. This causes the incorrect week number to be shown when week numbers are displayed. For example, the last week of 2024 beginning on 30 December should be ISO week 1 of 2025 and not week 53 of 2024. Because of this, the week numbers for 2025 are off by one.
I believe this is the ultimate cause of an issue reported in react-multi-datepicker: shahabyazdi/react-multi-date-picker#321
It would be nice if the
getWeekOfYear
used the ISO week, but if the current calculation is needed for other calendars or use cases, perhaps adding an option touseISOWeekNumber
would work, as well, so that consumers of the library can choose.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect '1' to show as the week number because that would be the correct ISO week number for the last week of December 2024/first week of January 2025.
Screenshots
Desktop:
The text was updated successfully, but these errors were encountered: