ISO calendar year != year
Bug #79825 reported by
Marius Gedminas
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SchoolTool |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
I discovered this bug while reading the source code.
datetime.
isocalendar() to get isoweek in several places. In at least one place
(WeeklyView) we use self.cursor.year and self.cursor.
year and week numbers. This is wrong, since if Jan 1 is a Saturday (e.g.), the
first week in that year will nominally still be Week 53 of the *previous* year
rather than the current year.
Changed in schooltool: | |
importance: | Low → Wishlist |
status: | In Progress → Confirmed |
tags: | added: calendar |
To post a comment you must log in.
I agree that the current behaviour is not very clean, but I'm not sure how to
fix it. We could write 'Week 0' instead of 'Week 53', but do we really want to
do that? I'm strongly against showing the number of the previous year -- that
would be very confusing.