aboutsummaryrefslogtreecommitdiff
path: root/internal/calendar/temporal.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 10:45:09 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 10:45:09 +0200
commitd571091e25e87758c3c77fbc8b2d935bcc8304a4 (patch)
tree5a523c231760040d57ebb2e556d17656b0c0ba81 /internal/calendar/temporal.go
parent44cb30b7ffcd776b26952080d1ec3587282a3db4 (diff)
downloadlectio-d571091e25e87758c3c77fbc8b2d935bcc8304a4.tar.gz
lectio-d571091e25e87758c3c77fbc8b2d935bcc8304a4.zip
feat(of): Christmas-season weekday ferials from catholic-resources.org (date-based)
Completes the seasonal weekday lectionary. The Christmas-season weekdays sit on the AdventChristmas page in a SHIFTED 6-column layout (Day in c[1], not c[2] like Advent's 7-column) -- the generator now finds the Day column wherever it is. Adds date-based slugs to temporal.go: christmas-dec-<29..31> (octave), christmas-jan-<2..7> (before Epiphany), christmas-after-epiphany-<weekday> (before the Baptism). Fixes the christmas-octave-fri coverage gap and the by-date/by-week collision. 362/362 seasonal ferial-days render across 2026-2029 with 0 gaps. Extends TestOFSeasonalFerials. All of Advent/Lent/Easter/Christmas weekdays now CR-sourced; only the Commons remain (optional -- memorials default to the ferial).
Diffstat (limited to 'internal/calendar/temporal.go')
-rw-r--r--internal/calendar/temporal.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/calendar/temporal.go b/internal/calendar/temporal.go
index dadae49..b0dc653 100644
--- a/internal/calendar/temporal.go
+++ b/internal/calendar/temporal.go
@@ -223,13 +223,23 @@ func temporal(date time.Time, sel Selection) temporalDay {
return ferialDay(Advent, "advent-"+itoa(week)+"-"+weekdayAbbr(wd), Violet, week, privFeria)
case !date.Before(christmasThis): // Dec 25..Dec 31 — Christmas octave
+ // The octave-day ferials (Dec 29-31) have readings proper to the date;
+ // Dec 25-28 are the Nativity and its feasts (Stephen/John/Innocents).
+ if date.Day() >= 29 {
+ return ferialDay(Christmas, "christmas-dec-"+itoa(date.Day()), White, 0, false)
+ }
return ferialDay(Christmas, "christmas-octave-"+weekdayAbbr(wd), White, 0, false)
case !date.After(baptismThis): // Jan 1..Baptism — Christmas season
if sun {
return sundayDay(Christmas, "christmas-sunday-"+weekdayAbbr(wd), White, 0)
}
- return ferialDay(Christmas, "christmas-"+weekdayAbbr(wd), White, 0, false)
+ // Before Epiphany the weekdays are proper to the date (Jan 2-7); after
+ // Epiphany they are keyed by weekday (the days before the Baptism).
+ if date.Before(epiphany(y, sel)) {
+ return ferialDay(Christmas, "christmas-jan-"+itoa(date.Day()), White, 0, false)
+ }
+ return ferialDay(Christmas, "christmas-after-epiphany-"+weekdayAbbr(wd), White, 0, false)
default: // Ordinary Time (span 1: after Baptism..before Lent; span 2: after Pentecost..before Advent)
var week int