From cf45e9f7f3146bca6039b63e2be02463b02f8043 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 28 Jul 2026 14:46:17 +0200 Subject: fix(EF): fill reading gaps (major feasts, feria-repeat-through-feast, sundays) EF readings had ~1.8% of days with no readings (major feasts falling back to the wrong Sunday, feria-repeats broken when the preceding Sunday was a feast). Now 0 gaps over 9496 days (2025-2050); reading correctness spot-checks match missalemeum except the resumed-Epiphany-Sunday edge (next commit). - calendar.TemporalSlug: the green-season weekday-repeats-the-Sunday rule uses the Sunday's TEMPORAL slug, so a Monday still finds its Sunday Mass when that Sunday was displaced by a feast (e.g. the Purification on Feb 2). - Add the missing EF temporal Masses (from missalemeum): the Nativity Day Mass (Heb 1:1-12 / John 1:1-14), Epiphany (Isa 60:1-6 / Matt 2:1-12), the Octave Day of Christmas (Titus 2:11-15 / Luke 2:21), the 6th Sunday after Epiphany (1 Thess 1:2-10 / Matt 13:31-35), and the last Sunday after Pentecost (Col 1:9-14 / Matt 24:15-35). --- internal/caldata/readings.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/caldata/readings.go') diff --git a/internal/caldata/readings.go b/internal/caldata/readings.go index 1b87b7a..3e46ccd 100644 --- a/internal/caldata/readings.go +++ b/internal/caldata/readings.go @@ -76,11 +76,12 @@ func Readings(sel calendar.Selection, layers []calendar.Layer, date time.Time, d return r } } - // EF: a green-season weekday with no proper Mass repeats the preceding Sunday. + // EF: a green-season weekday with no proper Mass repeats the preceding + // Sunday's Mass. Use the Sunday's TEMPORAL slug (not its observed) so the + // repeat still resolves when that Sunday was a feast (e.g. the Purification). if sel.Form == "old" && day.Observed.Layer == "temporal" && date.Weekday() != time.Sunday { sun := date.AddDate(0, 0, -int(date.Weekday())) // preceding Sunday (Sunday = 0) - sd := calendar.Compute(sun, sel, layers) - return TemporalReadings(sel.Form, sd.Observed.Slug) + return TemporalReadings(sel.Form, calendar.TemporalSlug(sun, sel)) } return nil } -- cgit v1.3