Adds a real label under each hour's heading — "Monday in the 10th week after Trinity", "The 1st Sunday of Advent" — computed from whichever LiturgicalDay the hour actually resolved against, which can differ from the nav date for Compline's evening anticipation. calendar/day-label.ts combines two things: an ordinal week-within-season label (pure date arithmetic on the season anchors from calendar/temporal.ts and calendar/easter.ts — Trinity-counted, not Divinum Officium's own Pentecost-counted convention; meant to become configurable later via the same day->id indirection already used for the sanctoral calendar, not hardcoded forever), and a feast name from calendar/commemorations.ts's occurrence decision — shown alone if the feast displaces the day outright, prefixed onto the temporal label if merely commemorated, or omitted entirely if nothing's occurring.
This commit is contained in:
@@ -85,11 +85,12 @@ describe('resolveOrdo("compline", ...)', () => {
|
||||
expect(last?.kind === 'preces' ? last.text.text.en : undefined).toContain('Hail holy Queen');
|
||||
});
|
||||
|
||||
it('anticipates Advent I: the Saturday evening before switches to the Alma Redemptoris Mater', () => {
|
||||
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.
|
||||
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');
|
||||
expect(eve.dayLabel).toBe('The 1st Sunday of Advent');
|
||||
|
||||
const dayBefore = resolveOrdo('compline', '2025-11-28');
|
||||
const lastBefore = dayBefore.parts[dayBefore.parts.length - 1];
|
||||
|
||||
Reference in New Issue
Block a user