Skip to content
Snippets Groups Projects

Resolve "Problems with dates which are in the new year, but in the last calendar week of the old year"

All threads resolved!
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -69,7 +69,7 @@ class CalendarWeek:
if when.month == 12 and week == 1:
year += 1
if (when.month == 52 or when.month == 53) and when.month == 1:
if (week == 52 or week == 53) and when.month == 1:
year -= 1
return cls(year=year, week=week)
Loading