diff --git a/aleksis/apps/chronos/util.py b/aleksis/apps/chronos/util.py index aebd2015e322838f278b7f1f8f723ddb5c73d8b7..c9501c0385d9eba9f3ca3bca611a105c4a53a5cf 100644 --- a/aleksis/apps/chronos/util.py +++ b/aleksis/apps/chronos/util.py @@ -20,7 +20,10 @@ class CalendarWeek: def from_date(cls, when: date): """ Get the calendar week by a date object (the week this date is in). """ - return cls(year=when.year, week=int(when.strftime("%V"))) + week = int(when.strftime("%V")) + year = when.year + 1 if when.month == 12 and week == 1 else when.year + + return cls(year=year, week=week) @classmethod def current_week(cls) -> int: