Skip to content

Commit

Permalink
fix: update current year calculation to use isocalendar
Browse files Browse the repository at this point in the history
  • Loading branch information
fleinen committed Dec 30, 2024
1 parent 9353618 commit 763e563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/weekly_strava_stats/storage/week_stats_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def load_weekly_stats(self, relative_week_number: int) -> Optional[WeekStats]:
Optional[StravaStats]: The stats for the requested week. None if the stats are not found.
"""
now = datetime.now()
current_year = now.year
current_year = now.isocalendar()[0]
current_week_number = now.isocalendar()[1]

target_week_number = current_week_number + relative_week_number
Expand Down

0 comments on commit 763e563

Please sign in to comment.