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

Fix "current" week calculation outside the regular season #983

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

bherbst
Copy link
Contributor

@bherbst bherbst commented Nov 20, 2024

Summary:
Our previous "current" week calculation doesn't really work outside the regular season because we are comparing the current week number of the year to tabs that represent an entire month.

For example, if the season ends on "week 7" (let's ignore pre-season for the sake of this example), then the following month is "week 8" and two months later is "week 9". But going by the calendar, we are on like week 20 by that point.

Instead, our EventWeekTab now represents a range of actual calendar weeks so we can find the correct tab for the current week.

Issues Reference:
Fixes #981

Test Plan:
New unit tests!
Also confirmed November is now correctly selected by default instead of December ✅

EventWeekTab now represents a range of weeks so we can find the right one
@bherbst bherbst merged commit bb9480c into the-blue-alliance:master Nov 27, 2024
4 checks passed
@bherbst bherbst deleted the select_correct_week branch November 27, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App opens to the wrong month in the off-season
1 participant