Don't commemorate a Vigil alongside the very feast it anticipates

At Vespers/Compline, a day's own Vigil losing tonight to tomorrow's First
Vespers was showing up as a redundant extra commemoration alongside that
same feast (e.g. Nov 29's Compline showing both "St. Andrew" and "Vigil
of St. Andrew" for Advent I's anticipated evening).

Added an explicit `vigilOf` field to each Vigil's own saint record
(several Vigil ids don't map cleanly to their feast's id by stripping a
`vigil-of-` prefix — `vigil-of-the-assumption` vs `assumption`,
`vigil-of-st-james` vs `st-james-the-greater` — so this needs to be
explicit rather than guessed from the id or date adjacency).
calendar/vespers.ts's evening-anticipation merge now skips adding the
Vigil commemoration when tomorrow's winner or its own commemorations
already include that same feast.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-18 11:00:09 -04:00
parent f43f030a6a
commit 79372fb274
14 changed files with 61 additions and 2 deletions
+10
View File
@@ -78,6 +78,16 @@ export interface SaintRecord {
/** See calendar/types.ts's OctaveConfig doc comment. Absent for the vast
* majority of saints — only ones with a real octave declare it. */
octave?: OctaveConfig;
/** For a `rank: vigil` record only — the real id of the feast this is
* the eve of (e.g. `st-andrew`, not derivable from this record's own id
* by stripping a `vigil-of-` prefix: several vigils' ids don't match
* their feast's id exactly — `vigil-of-the-assumption` vs `assumption`,
* `vigil-of-st-james` vs `st-james-the-greater`). Lets
* calendar/vespers.ts's evening-anticipation merge recognize "today's
* Vigil is being displaced by the very feast it's the eve of" precisely
* (rather than guessing from date adjacency alone) and skip
* commemorating the Vigil redundantly alongside its own feast. */
vigilOf?: string;
}
const sanctoralCalendar = sanctoralCalendarData as { days: Record<string, string[]> };