From 88ade3a7b7e15e6742d367bdc4b95b1293b92429 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 15:22:14 +0200 Subject: feat: EF temporal Sunday lectionary (offline Sunday Mass readings) Unique temporal-day slugs (season-sunday-week); scripts/genlect.go generates tridentine-lectionary.ini from missalemeum keyed by slug (55 entries: the Sundays of the whole EF year). caldata.TemporalReadings(form,slug) lookup; --liturgy resolves proper-of-feast else the temporal cycle and renders the text. bible.ParseRef strips abbreviation dots (1 Cor. -> 1 Cor). 52/53 Sundays fully resolve offline. --- internal/calendar/temporal_ef.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'internal/calendar') diff --git a/internal/calendar/temporal_ef.go b/internal/calendar/temporal_ef.go index 725aac2..151bd1b 100644 --- a/internal/calendar/temporal_ef.go +++ b/internal/calendar/temporal_ef.go @@ -1,6 +1,9 @@ package calendar -import "time" +import ( + "strconv" + "time" +) // Extraordinary Form (1962) season constants. Advent/Christmas/Lent/Easter are // shared with the OF; these are EF-specific. @@ -114,11 +117,12 @@ func temporalEF(date time.Time) temporalDay { // Sundays vs ferias of the current season. if sun { + week := efWeek(date, season, y, easter) rank := RankClass2 if season == Advent && sameDay(date, adventStart(y)) { rank = RankClass1 // 1st Sunday of Advent } - return efCel(season, "ef-"+string(season)+"-sunday", col, rank, efWeek(date, season, y, easter)) + return efCel(season, "ef-"+string(season)+"-sunday-"+strconv.Itoa(week), col, rank, week) } rank := RankClass4 // per-annum feria if season == Advent || season == Lent || season == Passiontide || season == Septuagesima { @@ -140,6 +144,10 @@ func efWeek(date time.Time, season Season, y int, easter time.Time) int { case TimeAfterEpiphany: jan6 := time.Date(y, 1, 6, 0, 0, 0, 0, time.UTC) return daysBetween(jan6, date)/7 + 1 + case Septuagesima: + return daysBetween(easter.AddDate(0, 0, -63), date)/7 + 1 + case Easter_: + return daysBetween(easter, date)/7 + 1 default: return 0 } -- cgit v1.3