summaryrefslogtreecommitdiff
path: root/internal/calendar/temporal_ef.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 15:07:12 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 15:07:12 +0200
commit310ac404f25b412c5c1ead12247b4eb36e9f0025 (patch)
tree6e1dcc5e1f85a483cef7044d341b7c940c1690a8 /internal/calendar/temporal_ef.go
parent44472bbe31475a3c672ae003d928d7caffb4b50a (diff)
parentc5abf87fa7198c8f245f407774e2326e4b6c9b9c (diff)
downloadlectio-310ac404f25b412c5c1ead12247b4eb36e9f0025.tar.gz
lectio-310ac404f25b412c5c1ead12247b4eb36e9f0025.zip
Merge branch 'engine-precedence-fixes': OF/EF calendar+readings flawlessness pass
Per-day validation vs litcal (OF) and missalemeum (EF) 2005-2050, all defects fixed and re-validated to zero: OF calendar 0 real errors forward, OF readings 0 unresolvable, EF 0 reading gaps + resumed Sundays correct.
Diffstat (limited to 'internal/calendar/temporal_ef.go')
-rw-r--r--internal/calendar/temporal_ef.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/calendar/temporal_ef.go b/internal/calendar/temporal_ef.go
index 877545c..7420ebd 100644
--- a/internal/calendar/temporal_ef.go
+++ b/internal/calendar/temporal_ef.go
@@ -82,6 +82,11 @@ func temporalEF(date time.Time) temporalDay {
easter := Easter(y)
season := efSeason(date, y, easter)
col := efColour(season)
+ // The Octave of Pentecost (Whit Monday through the Ember Saturday, easter+50
+ // to +55) is red, not the white of the rest of Paschaltide.
+ if !date.Before(easter.AddDate(0, 0, 50)) && !date.After(easter.AddDate(0, 0, 55)) {
+ col = Red
+ }
sun := date.Weekday() == time.Sunday
// Major feasts of the Lord (I class): nice titles + colour.
@@ -127,6 +132,24 @@ func temporalEF(date time.Time) temporalDay {
if season == Advent && sameDay(date, adventStart(y)) {
rank = RankClass1 // 1st Sunday of Advent
}
+ // Resumed Sundays after Pentecost (1960 Rubrics): when Easter is early
+ // there are more than 24 Sundays after Pentecost. The LAST Sunday before
+ // Advent always keeps the 24th (Last) Mass; the surplus Sundays between the
+ // 23rd and the last resume the Sundays after Epiphany that Septuagesima cut
+ // short -- the highest-numbered ones, so the 6th sits just before the Last.
+ if season == TimeAfterPentecost {
+ lastSun := adventStart(y).AddDate(0, 0, -7)
+ if sameDay(date, lastSun) {
+ return efCel(TimeAfterPentecost, "ef-time-after-pentecost-sunday-24", col, rank, 24)
+ }
+ if week > 23 {
+ p := daysBetween(easter.AddDate(0, 0, 49), lastSun) / 7 // total Sundays after Pentecost
+ e := week - p + 7 // resumed Sunday after Epiphany
+ // Season stays time-after-pentecost (calendrical); the Epiphany
+ // slug only routes the readings to the resumed Mass.
+ return efCel(TimeAfterPentecost, "ef-time-after-epiphany-sunday-"+strconv.Itoa(e), Green, rank, e)
+ }
+ }
return efCel(season, "ef-"+string(season)+"-sunday-"+strconv.Itoa(week), col, rank, week)
}
// The days between Ash Wednesday and the 1st Sunday of Lent have their own