From a80e61963756a28a3963a0442a8ccc1572518373 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 28 Jul 2026 14:35:24 +0200 Subject: fix(calendar): OF precedence/transfer + readings resolution; EF Pentecost octave Fixes found by validating the offline engine per-day vs the LiturgicalCalendar API (OF) and missalemeum (EF) across 2005-2050. OF calendar is now 0 real errors in the forward window (season/cycle already perfect). OF precedence/transfer (calendar): - Ash Wednesday and Holy Week Mon-Wed are band-2 privileged, so a coinciding feast (Chair of St Peter on Ash Wednesday) is suppressed, not observed. - Solemnities transfer out of Holy Week / the Easter octave: the Annunciation defers to the Monday after the 2nd Sunday of Easter; St Joseph is anticipated to the Saturday before Palm Sunday; the Nativity of St John the Baptist moves to Jun 23 when a Lord's solemnity (Sacred Heart / Corpus Christi) falls Jun 24. - Within a precedence band, a solemnity of the Lord/BVM outranks a saint's (dignity tiebreak) rather than losing an alphabetical slug tie. - Perpetua & Felicity corrected optional -> obligatory memorial. OF readings resolution (bible.OFRef + lectionary data): - Verse-accurate Hebrew->Vulgate psalm mapping incl. the split psalms (9/10, 114/115, 116, 147); "+" verse joins and abbreviated ranges ("127-28") normalized; single-chapter books (2/3 John, Jude) get chapter 1. - Cleaned harvest artifacts from of-lectionary.ini (descriptive-suffix gospels, "or Year A" alternates, "*"/"[Vulg.]"/bracket markers, slash abbreviations); Joel/Malachi/Zechariah/Esther book-versification citations fixed to Vulgate. - Split a merged Ps 15:10/11 row in vul.tsv. Result: 0 unresolvable OF readings over 2557 rendered days (cycles A/B/C, varied Easters). EF: the Octave of Pentecost (Whit Monday-Saturday) is red, not white. --- internal/bible/ofref_test.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'internal/bible/ofref_test.go') diff --git a/internal/bible/ofref_test.go b/internal/bible/ofref_test.go index 4b9cb1e..4455d94 100644 --- a/internal/bible/ofref_test.go +++ b/internal/bible/ofref_test.go @@ -19,13 +19,16 @@ func TestOFRef(t *testing.T) { {"ps27-drb", "Psalms 27:1,4,13-14", "drb", "Psalms 27:1,4,13-14"}, // Ps 27 has no DRB title fold {"ps27-hebrew", "Psalms 27:1,4,13-14", "hebrew", "Psalms 27:1,4,13-14"}, - // Boundary cases of HebrewToVulgateChapter. - {"ps8-vulgate", "Psalms 8:2", "vulgate", "Psalms 8:2"}, // <=8 unchanged - {"ps9-vulgate", "Psalms 9:2", "vulgate", "Psalms 9:2"}, // 9,10 -> 9 - {"ps10-vulgate", "Psalms 10:1", "vulgate", "Psalms 9:1"}, // 10 -> 9 - {"ps11-vulgate", "Psalms 11:1", "vulgate", "Psalms 10:1"}, // 11..113 -> h-1 - {"ps116-vulgate", "Psalms 116:12", "vulgate", "Psalms 114:12"}, - {"ps147-vulgate", "Psalms 147:12", "vulgate", "Psalms 146:12"}, + // Verse-accurate Hebrew->Vulgate mapping, including the joined/split psalms. + {"ps8-vulgate", "Psalms 8:2", "vulgate", "Psalms 8:2"}, // <=8 unchanged + {"ps9-vulgate", "Psalms 9:2", "vulgate", "Psalms 9:2"}, // Heb 9 = Vulg 9 + {"ps10-vulgate", "Psalms 10:1", "vulgate", "Psalms 9:22"}, // Heb 10:1 = Vulg 9:22 + {"ps11-vulgate", "Psalms 11:1", "vulgate", "Psalms 10:1"}, // 11..113 -> h-1 + {"ps115-vulgate", "Psalms 115:1", "vulgate", "Psalms 113:9"}, // Heb 115:1 = Vulg 113:9 + {"ps116a-vulgate", "Psalms 116:1-9", "vulgate", "Psalms 114:1-9"}, + {"ps116b-vulgate", "Psalms 116:12-13,17-18", "vulgate", "Psalms 115:3-4,8-9"}, + {"ps147a-vulgate", "Psalms 147:1-11", "vulgate", "Psalms 146:1-11"}, + {"ps147b-vulgate", "Psalms 147:12-13,19-20", "vulgate", "Psalms 147:1-2,8-9"}, {"ps148-vulgate", "Psalms 148:1", "vulgate", "Psalms 148:1"}, // >=148 unchanged // DRB title-fold verse shift: Ps 51 folds 2 title verses into verse 1. -- cgit v1.3