Fix Matins occasion label reusing winner-centric day label
occasionName's fallback reused getDayLabel(day), which is winner-centric -- when a sanctoral feast wins the day, it returns the winner's own full label including rank (e.g. "All Saints (Duplex I Class)"), so a reading tagged with the governing Sunday's temporal id got wrapped as "(for All Saints (Duplex I Class))" instead of naming the Sunday. Exports day-label.ts's existing temporalLabel helper (the plain ordinal Sunday/ feria name, independent of who won) and uses it instead whenever a saint has won the day. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGsATZvfnpQ81HQuoF5JuL
This commit is contained in:
@@ -320,7 +320,14 @@ function trinitytideOverrideLabel(day: LiturgicalDay): Bi | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function temporalLabel(day: LiturgicalDay): Bi {
|
||||
/** The plain temporal/Sunday-or-feria name only (ordinal week/season
|
||||
* phrasing, e.g. "The Twenty-fourth Sunday after Pentecost"), independent of
|
||||
* who actually won the day — i.e. what the day would be called if the
|
||||
* temporal cycle were the winner. Exported for callers (e.g.
|
||||
* `hours/matins.ts`'s `occasionName`) that want to name the governing
|
||||
* Sunday/feria without repeating a sanctoral winner's own rank-qualified
|
||||
* label from `getDayLabel`. */
|
||||
export function temporalLabel(day: LiturgicalDay): Bi {
|
||||
const trinitytideOverride = trinitytideOverrideLabel(day);
|
||||
if (trinitytideOverride) {
|
||||
return trinitytideOverride;
|
||||
|
||||
Reference in New Issue
Block a user