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:
@@ -1,6 +1,7 @@
|
||||
import type { HourDefinition, HourPart, ResolvedOrdo, ResolvedPart } from './types';
|
||||
import type { LiturgicalDay } from '../calendar/types';
|
||||
import { resolveEveningDay } from '../calendar/vespers';
|
||||
import { getDayLabel } from '../calendar/day-label';
|
||||
import { getPsalmVerses } from '../psalter';
|
||||
import { getCommonProper } from '../propers';
|
||||
import { getHymnDoxologyId } from './hymn-doxology';
|
||||
@@ -97,5 +98,5 @@ export function resolveOrdo(date: string): ResolvedOrdo {
|
||||
// need to keep a separate "real" day around.
|
||||
const day = resolveEveningDay(date);
|
||||
const parts = complineDefinition.parts.flatMap((part) => resolvePart(part, day));
|
||||
return { hourId: 'compline', date, parts };
|
||||
return { hourId: 'compline', date, parts, dayLabel: getDayLabel(day) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user