diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 16:17:18 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 16:17:18 +0200 |
| commit | a1e041dfbe55194c7fea0636d38cff33ee28315d (patch) | |
| tree | 1138c5cbf5ca008dc3da11e93634c1017c63eeef /internal/calendar/temporal_ef.go | |
| parent | de102e446a715883c74e6295ff223e37e397f5ed (diff) | |
| download | lectio-a1e041dfbe55194c7fea0636d38cff33ee28315d.tar.gz lectio-a1e041dfbe55194c7fea0636d38cff33ee28315d.zip | |
feat(ef): complete offline EF readings — proper ferias, deuterocanon, Latin fallback
Finish the Extraordinary Form (1962) offline Mass readings so every day of
the year resolves in both English and Polish.
Temporal engine (temporal_ef.go):
- Unique ferial slugs "ef-<season>-<week>-<weekday>" so penitential-season
weekdays (Lent, Advent, Passiontide, Easter octave) can key their own
proper Masses; green-season ferias have no entry and fall back to the
preceding Sunday (the 1962 rule).
- Special "ef-lent-after-ashes-<weekday>" case for the days between Ash
Wednesday and Lent I, which have their own propers.
Lectionary (tridentine-lectionary.ini, 55 -> 143 entries) via genlect.go:
- Generator now fetches proper-season weekdays and stores a feria only when
its Mass differs from the preceding Sunday's.
- cleanCite() normalises two missalemeum data glitches: a stray comma
between book and chapter ("4 Kings, 5:1" -> "4 Kings 5:1") and a
period-as-separator ("John 20. 19-31" -> "John 20:19-31"), both guarded so
legitimate multi-chapter citations are untouched.
Citations & corpora:
- books.ini: Douay abbreviations in the [en] dialect (Ex, Ezech, Jonas, and
3/4 Kings -> canonical 1/2 Kings), so the EF Lenten epistles resolve while
the display keeps modern sigla.
- drb.tsv: +205 rows backfilling the deuterocanonical Daniel 13-14 (Susanna,
Bel) and Esther 11-16 (Greek additions) from get.bible douayrheims, which
the base corpus omitted; scripts/gen-deutero.py documents the fetch.
Rendering (liturgy.go):
- readingLine() falls back to the Latin Vulgate (complete) when the
vernacular corpus lacks a passage, with a clear note. Covers the Polish
Wujek deuterocanon gap (no clean public-domain source exists) and any
future vernacular gap; faithful to the EF as a Latin rite.
Result: 730/730 days resolve for both EN (native) and PL (native + Latin
fallback for 3 deuterocanon days). Version 0.32.0 -> 0.33.0.
Diffstat (limited to 'internal/calendar/temporal_ef.go')
| -rw-r--r-- | internal/calendar/temporal_ef.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/internal/calendar/temporal_ef.go b/internal/calendar/temporal_ef.go index 151bd1b..6f641f4 100644 --- a/internal/calendar/temporal_ef.go +++ b/internal/calendar/temporal_ef.go @@ -2,6 +2,7 @@ package calendar import ( "strconv" + "strings" "time" ) @@ -124,11 +125,24 @@ func temporalEF(date time.Time) temporalDay { } 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 + // proper Masses (not part of a numbered Lenten week). + if season == Lent && date.Before(easter.AddDate(0, 0, -42)) { + return efCel(Lent, "ef-lent-after-ashes-"+weekdayLower(date), Violet, RankClass3, 0) + } + week := efWeek(date, season, y, easter) rank := RankClass4 // per-annum feria if season == Advent || season == Lent || season == Passiontide || season == Septuagesima { rank = RankClass3 // penitential ferias rank higher } - return efCel(season, "ef-"+string(season)+"-feria", col, rank, efWeek(date, season, y, easter)) + // Unique ferial slug (season-week-weekday) so proper ferias (Lent, Advent, + // Holy Week, Ember days) can key their own readings; green-season ferias + // simply have no lectionary entry and fall back to the Sunday. + return efCel(season, "ef-"+string(season)+"-"+strconv.Itoa(week)+"-"+weekdayLower(date), col, rank, week) +} + +func weekdayLower(d time.Time) string { + return strings.ToLower(d.Weekday().String()) } // efWeek is a best-effort week-within-season number for display (not |
