-
Notifications
You must be signed in to change notification settings - Fork 92
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
Incorrect Year according to Week Display on Leaderboard #589
Conversation
👷 Deploy request for leaderboard-develop pending review.Visit the deploys page to approve it
|
This will solve the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rithviknishad I fixed the issue, kindly review it. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a fan of this complicated logic, but works.
Since we are following the ISO Week Number Calculation, it was supposed to display as "Week 1 of 2025" instead of "Week 1 of 2024"
The function was supposed correctly identify December 31, 2024 as part of week 1 of 2025 because it falls after the last Thursday of 2024 (which is December 26, 2024). While the function accurately determines the week number, it fails to handle the year correctly.
This change ensures that both the week number and year correctly reflect the ISO week date standards, especially at the boundaries between years.