Resolve Advent IV landing on Dec 24 as the Vigil, with Advent IV commemorated
Deploy / deploy (push) Successful in 1m25s

When Advent 4's own Sunday lands on Dec 24, the Vigil of Christmas's
identity (rank, collect, Lauds antiphons, Matins Gospel nocturn) now
governs the day, matching the reference engine's own rule that a
privileged Sunday never displaces it. Unlike the reference engine's own
"no commemoratio" for this exact collision, Advent 4 is deliberately
still commemorated — the Sundays of Advent have real standing of their
own. Matins' three-nocturn Sunday psalmody is untouched either way,
since it's driven by weekday, not by which id wins.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ME8QNPdEmHSbSx1r6VmDRG
This commit is contained in:
2026-08-30 08:55:00 -04:00
parent 654ec868cb
commit a18ad7f57c
3 changed files with 109 additions and 8 deletions
+27
View File
@@ -109,6 +109,7 @@ export function resolveDay(isoDate: string): LiturgicalDay {
winner = applyChristmasOctaveSunday(isoDate, weekday, winner, commemorations);
winner = applyMovableFeasts(isoDate, winner, commemorations);
applyEpiphany6Commemoration(isoDate, commemorations);
applyAdventFourVigilCommemoration(isoDate, weekday, commemorations);
return { date: isoDate, weekday, season, temporalCategory, winner, commemorations };
}
@@ -141,6 +142,32 @@ function applyEpiphany6Commemoration(isoDate: string, commemorations: Commemorat
commemorations.push({ kind: 'temporal', id: 'post-epiphany-6' });
}
/**
* When Advent 4's own Sunday lands on Dec 24 (its latest possible date),
* `resolveTemporalId` already gives that day the Vigil of Christmas's own
* identity (`vigil-of-christmas` — collect, Lauds antiphons, Matins Gospel
* nocturn), matching the reference engine's own rule that the Vigil's rank
* governs. Per direct instruction (2026-08), unlike the reference engine's
* own `no commemoratio` for this exact day, Advent 4 itself is still
* commemorated here — the Sundays of Advent have real standing of their
* own, distinct from an ordinary saint quietly ceding to a Vigil. Purely
* additive, same shape as applyEpiphany6Commemoration just above: no new
* `Commemoration` variant needed, `getDayCollects` already resolves any
* `{ kind: 'temporal' }` commemoration's own `${id}-collect` for free.
* `advent-4` is hardcoded rather than recomputed because Dec 24 always
* falls at or after Advent's own 4th Sunday by construction (it's the
* latest date Advent's 4th Sunday can ever land on).
*/
function applyAdventFourVigilCommemoration(
isoDate: string,
weekday: ReturnType<typeof weekdayOf>,
commemorations: Commemoration[],
): void {
if (isoDate.slice(5) === '12-24' && weekday === 'sunday') {
commemorations.push({ kind: 'temporal', id: 'advent-4' });
}
}
/**
* Per direct instruction, scoped to exactly Dec 26-30 — every year
* contains exactly one real Sunday somewhere in that 5-day window.