Files
calendula/app
Jean-Luc Makiolaandmakiolaj 1807f228e7
Beta — Codeberg pre-release / detect (push) Successful in 8s
Beta — Codeberg pre-release / beta (push) Skipped
Share one date span across every view (#457) (#466)
Switching back to month view after going before 1 Jan 1900 in day or week view crashed with `IndexOutOfBoundsException: index: -1, size: 12`. Each view had its own range: the month grid and the date picker covered 1900–2100, while the week and day pagers reached roughly 1808–2191. The month view took the date it was handed without checking it.

- A new `CalendarSpan` (1 Jan 1600 – 31 Dec 2399) is used by the month and dense-week grids, the week, multi-day and day pagers, and the date picker's `yearRange`. No view can hand another a date it can't show, and you can now go past 2100 and before 1900 everywhere.
- Every write to the month view's current month goes through one clamp, and `yearMonthForIndex` can't throw on any index. This is a safety net for dates arriving from outside, such as another app opening Calendula via the time intent.
- Tapping a greyed-out day past either end of the grid is ignored.

The timeline pagers now number pages from the span's first day rather than around a fixed middle page, so page numbers change once. `PageNumberingTest` pins the new numbering.

Closes #457

Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de>
Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/466
2026-11-02 20:31:21 +01:00
..
2026-10-28 15:35:38 +01:00
2026-09-02 12:44:40 +02:00