Calendar and report: weeks start on Sunday in Greek, Bulgarian, Estonian, Irish, Slovene and five more #569
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#569
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading how the calendar and the report find the first day of a week and checkingFIRST_DAY_OF_WEEKunder every offered language.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atapplications/agenda.py:445-449(month_range),applications/agenda.py:476-483(week_days) andapplications/agenda.py:629(build);week_start, the settings andconfig/formats/are where they were.week_start()takesFIRST_DAY_OF_WEEKfrom the reader's locale, and the calendar's month and week views, the report's "last n weeks" period and its weekly cadence all follow it. For ten European languages whose countries start the week on Monday, that lookup answers Sunday, so a Greek or Slovene reader's calendar starts every row on Sunday and their report counts Sunday-to-Saturday weeks. #43 and #118 said the first day of the week would be checked for each language; for these it was not.applications/reports.py:66-77(week_start), used byweeks_period(reports.py:165-173),_cadence(reports.py:302),month_range(applications/agenda.py:373-377),week_days(agenda.py:403-411) andbuild(agenda.py:551);config/settings/base.py:480-492, whose British fallbacks leaveFIRST_DAY_OF_WEEKat Django's global default of 0;config/formats/holds onlyen_GB.elandslmodules setFIRST_DAY_OF_WEEK = 0;bg,bs,et,ga,isandsqleave it commented out, so the global default 0 answers;hyandlbhave no format module at all. Checked undertranslation.overridefor all 69 offered languages: those ten answer 0. A Greek reader opening Calendar for October 2026 gets a grid beginning Sunday 27 September under the column Κυρ; asking the report for the last four weeks on Wednesday 30 September gives 6 September (a Sunday) to 3 October. German and British English readers get Monday 28 September and 7 September.config/formats/<locale>/formats.pywithFIRST_DAY_OF_WEEK = 1forbg,bs,el,et,ga,hy,is,lb,slandsq;FORMAT_MODULE_PATHalready consults them before Django's own. Do not setFIRST_DAY_OF_WEEK = 1in settings as a blanket fallback: it would also movemt(Malta starts on Sunday in CLDR) and the African languages without a module, several of which also start on Sunday (South Africa, Ethiopia, Kenya); those belong to #70's per-language check.pt-ptandpt-branswer Sunday, which CLDR agrees with for both Portugal and Brazil.Done when
tests/test_reports.pypinsFIRST_DAY_OF_WEEKfor every language insettings.LANGUAGESagainst an explicit table, and fails today for the ten above.tests/test_calendar.pybuilds October 2026 undereland asserts the grid starts on Monday 28 September.Related to #43 and #118 (closed), which promised the first day of the week would be checked per language, and to #70 (open), which holds the same check for the African languages.