A 1925 addition, so nowhere in the Monastic Tridentinum 1617 base this project otherwise targets -- content sourced from "Monastic Divino 1930" instead, the Monastic-lineage version of the era that actually carries it. Always wins outright (Duplex I. classis, confirmed live), commemorating whichever Sunday after Pentecost it displaces -- same additive-layering shape as applyOctaves/applyMarianSaturday, run last so nested commemorations (e.g. a Simplex saint already commemorated under that Sunday) survive underneath it. Extended the Lauds psalmody-override mechanism (both the psalm groups and, newly, the chapter/responsory/hymn/versicle bundle) to recognize named temporal winners as unconditionally override-eligible, not just duplex-majus+ sanctoral ones -- generalizing what had been a Marian- Saturday-only special case. Suffrages needed their own explicit check too: isDoubleOrHigher only ever looks at a sanctoral rank, and a named temporal winner has no FeastClass to check at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+32
-1
@@ -1,6 +1,6 @@
|
||||
import type { Commemoration, DayWinner, LiturgicalDay, SanctoralIdentity, TemporalCategory } from './types';
|
||||
import { weekdayOf } from './weekday';
|
||||
import { resolveSeason, resolveTemporalCategory } from './temporal';
|
||||
import { resolveSeason, resolveTemporalCategory, sundayOnOrBefore } from './temporal';
|
||||
import { resolveTemporalId } from './temporal-id';
|
||||
import { getSanctoralCandidatesFor } from './feasts';
|
||||
import { decideOccurrence, isAtLeast, type OccurrenceResult } from './commemorations';
|
||||
@@ -102,10 +102,41 @@ export function resolveDay(isoDate: string): LiturgicalDay {
|
||||
|
||||
winner = applyOctaves(isoDate, winner, commemorations);
|
||||
winner = applyMarianSaturday(isoDate, weekday, temporalCategory, winner, commemorations);
|
||||
winner = applyChristTheKing(isoDate, winner, commemorations);
|
||||
|
||||
return { date: isoDate, weekday, season, temporalCategory, winner, commemorations };
|
||||
}
|
||||
|
||||
/** The Sunday on or before Oct 31 — always lands in October since Oct 31
|
||||
* is at most 6 days after the month's last Sunday. */
|
||||
function lastSundayOfOctober(year: number): string {
|
||||
return sundayOnOrBefore(`${year}-10-31`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Per direct instruction: the last Sunday of October is always Christ the
|
||||
* King, full stop — unlike every other layer in this file, nothing here
|
||||
* loses gracefully or gets a rank check; whatever was winning (a plain
|
||||
* numbered Sunday after Pentecost in every ordinary year, but modeled
|
||||
* generally in case a high-ranked sanctoral candidate is ever assigned to
|
||||
* that date too) is demoted straight to a commemoration. Confirmed live
|
||||
* (see data/calendar/temporal-feasts/christ-the-king.yml): Duplex I.
|
||||
* classis, well above anything that could contest it under this
|
||||
* project's own calendar.
|
||||
*/
|
||||
function applyChristTheKing(isoDate: string, winner: DayWinner, commemorations: Commemoration[]): DayWinner {
|
||||
const year = Number(isoDate.slice(0, 4));
|
||||
if (isoDate !== lastSundayOfOctober(year)) {
|
||||
return winner;
|
||||
}
|
||||
if (winner.kind === 'temporal') {
|
||||
commemorations.push({ kind: 'temporal', id: winner.id });
|
||||
} else {
|
||||
commemorations.push({ kind: 'sanctoral', id: winner.id, name: winner.name, rank: winner.rank });
|
||||
}
|
||||
return { kind: 'temporal', id: 'christ-the-king' };
|
||||
}
|
||||
|
||||
/**
|
||||
* Layered on top of everything above, same spirit as applyOctaves: never
|
||||
* changes decideOccurrence's own rules, just relabels the result on a free
|
||||
|
||||
Reference in New Issue
Block a user