Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week picker returns wrong year when selecting week 1 2025 #1055

Open
hankthetank opened this issue Dec 3, 2024 · 1 comment
Open

Week picker returns wrong year when selecting week 1 2025 #1055

hankthetank opened this issue Dec 3, 2024 · 1 comment
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working

Comments

@hankthetank
Copy link

Week picker select wrong year for week 1

We are using the week picker and if we select week 52 in 2024 it work as expected. Then we select the week after which should be week 1 2025 but instead the picker returns week 1 2024.

To Reproduce
Steps to reproduce the behavior:

  1. Enable week picker
  2. Go to jan 2025 and choose week 1
  3. Week 1 2024 is returned.

Expected behavior
Should return week 1 2025

Screenshots
image (21)

@hankthetank hankthetank added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Dec 3, 2024
@thelegend09
Copy link

It seems that this is how ISO dates work.

From Wikipedia: Weeks start with Monday and end on Sunday. Each week's year is the Gregorian year in which the Thursday falls. The first week of the year, hence, always contains 4 January. ISO week therefore usually deviates by 1 from the Gregorian for some days close to 1 January. […] If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in W01. If it is on a Friday, it is part of W53 of the previous year. If it is on a Saturday, it is part of the last week of the previous year which is numbered W52 in a common year and W53 in a leap year. If it is on a Sunday, it is part of W52 of the previous year.

https://en.wikipedia.org/wiki/ISO_week_date#Relation_with_the_Gregorian_calendar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants