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:
@@ -88,7 +88,12 @@ describe('resolveOrdo("compline", ...)', () => {
|
||||
it('anticipates Advent I: the Saturday evening before switches to the Alma Redemptoris Mater and shows the anticipated day label', () => {
|
||||
// Nov 30, 2025 is Advent I Sunday -- also St. Andrew's own day
|
||||
// (Duplex II. classis), correctly commemorated alongside it since the
|
||||
// November sanctoral pull (see tests/calendar/day-label.test.ts).
|
||||
// November sanctoral pull (see tests/calendar/day-label.test.ts). This
|
||||
// evening also anticipates Advent I from Nov 29, itself the Vigil of
|
||||
// St. Andrew -- but the Vigil isn't also shown alongside his own
|
||||
// feast (calendar/vespers.ts's own isVigilOfTomorrow check, keyed off
|
||||
// each Vigil's explicit `vigilOf` field): showing both would just be
|
||||
// redundant, the same feast named twice.
|
||||
const eve = resolveOrdo('compline', '2025-11-29');
|
||||
const last = eve.parts[eve.parts.length - 1];
|
||||
expect(last?.kind === 'preces' ? last.label : undefined).toBe('Alma Redemptoris Mater');
|
||||
|
||||
Reference in New Issue
Block a user