Compare commits

..

3 Commits

Author SHA1 Message Date
will 01667e7926 Revert ordinary-Sunday Semiduplex to transferring, per direct instruction
Deploy / deploy (push) Successful in 1m9s
Keeps Simplex commemorating in place, but a Semiduplex feast on an
ordinary Sunday goes back to transferring off to the next open day —
this app's own design choice, not a correction against a reference
engine. The transfer mechanism is already generic: this file's `decideOccurrence`
only signals "couldn't hold onto this candidate" for the day itself;
calendar/index.ts's resolveDay is what independently checks each
neighboring day's own native occurrence for an incoming transfer and
claims it — no separate lookback logic needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 11:56:15 -04:00
will 79372fb274 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>
2026-08-18 11:00:09 -04:00
will f43f030a6a Fix ordinary-Sunday precedence and unify getDayLabel's commemoration rendering
Two related fixes surfaced while chasing why St. Gregory Thaumaturgus
appeared to be misdated on Nov 18:

- calendar/commemorations.ts's `ordinary-sunday` case was transferring a
  Semiduplex (or lower) saint off the Sunday instead of commemorating it
  in place — an earlier, unverified guess. Live-verified against both
  Tridentine 1906 and Divino Afflatu 1954 (St. Gregory Thaumaturgus, St.
  Clement, St. Apollinaris, St. Thomas Becket, all real cases): the saint
  stays and is commemorated on the Sunday itself, same as Simplex, never
  pushed to the next open day. This is what was actually moving Gregory
  onto Nov 18 — not a data error. `applyChristmasOctaveSunday`'s own
  Dec 26-29 special case needed a matching adjustment (per its own
  documented intent, the displaced saint there is deliberately *not*
  commemorated in place, since he reappears in full on Dec 30 instead).

- getDayLabel had five branches, each hand-assembling its own
  filter/format logic for which commemorations to show — which is why
  the octave phrasing, the closing-day title, and a missing Sunday
  commemoration turned into three separate bugs earlier instead of one.
  Replaced with a single shared `collectCommemorations` used by every
  branch. This also exposed that the sanctoral-winner branch never
  showed any commemorated saint at all, and every other branch only
  showed the *first* one (`.find()`), silently dropping real collisions
  — both now show every commemorated saint, matching this app's own
  generous-commemoration design.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 10:59:50 -04:00
23 changed files with 307 additions and 104 deletions
+16 -2
View File
@@ -165,8 +165,22 @@ export function decideOccurrence(
return { winner: temporalWinner, commemorations: [sanctoralCommemoration(sanctoral)] }; return { winner: temporalWinner, commemorations: [sanctoralCommemoration(sanctoral)] };
} }
// Semiduplex or Vigil: no room here at all, in either direction — // Semiduplex or Vigil: no room here at all, in either direction —
// better to preserve the feast whole on another day than downgrade // per direct instruction, an ordinary Sunday's own standing pushes
// it to a bare commemoration. // a Semiduplex feast off to the next open day (typically the
// Monday right after) rather than downgrading it to a bare
// commemoration. This `transfer` signal is only half of the
// mechanism: it's just this day noting "I couldn't hold onto this
// candidate." The other half — a later day actually claiming a
// transferred-in candidate — lives entirely in calendar/index.ts's
// resolveDay: for *every* date it resolves, it independently
// recomputes `resolveNativeOccurrence` for both the day before and
// the day after, checks whether *that* neighbor's own native
// occurrence produced a `transfer` pointed this direction, and only
// then folds it in via `applyIncomingTransfer`. So "Monday looks
// back at the sanctoral calendar to see if Sunday's own candidate
// needs a home" isn't a separate mechanism to build — it's the
// existing generic transfer-consumption check, which already runs
// for every day regardless of category.
return { return {
winner: temporalWinner, winner: temporalWinner,
commemorations: [], commemorations: [],
+98 -71
View File
@@ -9,7 +9,7 @@
// become a configurable choice later (the same day->id indirection // become a configurable choice later (the same day->id indirection
// philosophy already used for the sanctoral calendar), not hardcoded here // philosophy already used for the sanctoral calendar), not hardcoded here
// forever — just not built yet. // forever — just not built yet.
import type { Commemoration, FeastClass, LiturgicalDay, TemporalCategory } from './types'; import type { FeastClass, LiturgicalDay, TemporalCategory } from './types';
import { easterSunday } from './easter'; import { easterSunday } from './easter';
import { adventStart, firstSundayStrictlyAfter, sundayOnOrBefore } from './temporal'; import { adventStart, firstSundayStrictlyAfter, sundayOnOrBefore } from './temporal';
import { addDays, daysBetween, toIsoDate } from './date-math'; import { addDays, daysBetween, toIsoDate } from './date-math';
@@ -107,14 +107,14 @@ const ORDINAL_SEASONS: Partial<Record<string, OrdinalSeason>> = {
* octave, but nobody calls it that). Advent's own anchor (Advent I Sunday) * octave, but nobody calls it that). Advent's own anchor (Advent I Sunday)
* doesn't take this branch — it's already "the 1st Sunday of Advent" via * doesn't take this branch — it's already "the 1st Sunday of Advent" via
* the ordinal path below. */ * the ordinal path below. */
function anchorDayName(day: LiturgicalDay): string | undefined { function anchorDayName(day: LiturgicalDay, withRank = true): string | undefined {
const config = ORDINAL_SEASONS[day.season]; const config = ORDINAL_SEASONS[day.season];
if (!config || config.includeAnchorWeek) { if (!config || config.includeAnchorWeek) {
return undefined; return undefined;
} }
const year = Number(day.date.slice(0, 4)); const year = Number(day.date.slice(0, 4));
if (day.date === config.anchorDate(year)) { if (day.date === config.anchorDate(year)) {
return config.anchorRank ? `${config.anchorName} (${formatRank(config.anchorRank)})` : config.anchorName; return withRank && config.anchorRank ? `${config.anchorName} (${formatRank(config.anchorRank)})` : config.anchorName;
} }
return undefined; return undefined;
} }
@@ -242,43 +242,65 @@ function octaveCommemorationLabel(octave: ActiveOctave): string {
return octaveCoreName(octave); return octaveCoreName(octave);
} }
/** Every `kind: 'octave'` commemoration on `day` other than `excludeId` — /** Every commemoration on `day`, resolved to display strings and grouped
* an octave already serving as the day's own headline (a sanctoral * by kind — the single place that decides both "is this commemoration
* winner sharing an octave's id, or the octave `resolveActiveOctave` * eligible to show at all here" and "how is it formatted", so every
* itself picked as primary below) would be redundant to list again. * caller below shares the same answer instead of each hand-rolling its
* Plain names, not `octaveLabel`'s "Nth Day within the Octave of ..." * own filter/format pass (that duplication is exactly how Aug 19's octave
* phrasing — that fuller phrasing is reserved for an octave that's * phrasing, Aug 17's closing-day title, and Aug 16's missing Sunday
* actually the day's own primary identity, not a secondary mention * commemoration ended up as three separate bugs instead of one). Callers
* alongside it (same plain-name convention `commemoratedSaint` already * still decide their own *order* — e.g. the octave-headline branch wants
* uses below). Real gap this closes: a *second*, non-winning active * octaves before a commemorated saint, while a plain Sunday/feria wants a
* octave (e.g. the Assumption's own day 3, alongside St. Lawrence's * commemorated saint *before* its own temporal label — since that
* winning closing day) was previously dropped from the label entirely, * ordering reflects a real, deliberate liturgical convention per branch,
* regardless of which branch below actually renders the primary name. */ * not an accident to unify away.
function otherActiveOctaveNames(day: LiturgicalDay, excludeId: string | undefined): string[] { *
return day.commemorations * - `sanctoral`: every commemorated saint, plain name, no rank (multiple
.filter((c): c is Extract<Commemoration, { kind: 'octave' }> => c.kind === 'octave' && c.id !== excludeId) * real ones can coexist — e.g. two colliding saints on the same date —
.map((c) => c.name); * this app's own "generous commemorations" design keeps every one of
} * them, not just the first).
* - `temporal`: the day's own real Sunday/feria identity, if
/** Same commemoration-filtering as `otherActiveOctaveNames`, but rendered * `decideOccurrence` demoted it to a commemoration (`ordinary-sunday`/
* with `octaveCommemorationLabel`'s fuller "Nth Day within the Octave of X" * `privileged-feria`/`privileged-feria-minor`) — matched by id against
* phrasing rather than a plain name — the real DO title an octave day * `resolveTemporalId(day.date)` specifically, not "any temporal-kind
* carries even when it *lost* outright to an occurring saint (e.g. Aug 19's * commemoration present", so unrelated side-notes like
* real Divino Afflatu 1954 title is "S. Joannis Eudes Confessoris ~ Duplex" * `applyEpiphany6Commemoration`'s fixed `post-epiphany-6` don't get
* with the commemoration read as "Quinta die infra Octavam S. Assumptionis * mistaken for it. Rendered via `anchorDayName`/`temporalLabel`, the
* Beatæ Mariæ Virginis", not a bare "The Assumption of the Blessed Virgin * same machinery a primary temporal label uses, minus the rank.
* Mary"). Only used from the sanctoral-winner branch below — the * - `octave`: every active octave other than `excludeOctaveId` (the
* octave-vs-octave secondary mention (`otherActiveOctaveNames` itself, * octave already serving as the day's own headline, if any) — only
* still used in the octave-headline branch further down) keeps its plain * when `showOctaves` is true. Live-verified this is *not* simply "is an
* name on purpose, per that function's own doc comment. */ * octave active": on a Sunday or privileged feria a saint won outright
function commemoratedOctaveDayLabels(day: LiturgicalDay, excludeId: string | undefined): string[] { * against, an unrelated active octave isn't commemorated at all (Aug
const active = activeOctavesFor(day.date); * 16's St. Joachim names only the Sunday, not St. Lawrence's/the
return day.commemorations * Assumption's octaves, even though both are technically active) —
.filter((c): c is Extract<Commemoration, { kind: 'octave' }> => c.kind === 'octave' && c.id !== excludeId) * octaves are only shown on `ordinary-feria` (no real standing of its
.map((c) => { * own to prefer instead) or when the octave itself is governing the
const octave = active.find((a) => a.id === c.id); * headline. Rendered via `octaveCommemorationLabel` — the "Nth Day
return octave ? octaveCommemorationLabel(octave) : c.name; * within the Octave of X" phrasing, no rank.
}); */
function collectCommemorations(
day: LiturgicalDay,
opts: { showOctaves: boolean; excludeOctaveId?: string },
): { sanctoral: string[]; temporal: string[]; octaves: string[] } {
const temporalId = resolveTemporalId(day.date);
const activeOctaves = opts.showOctaves ? activeOctavesFor(day.date) : [];
const sanctoral: string[] = [];
const temporal: string[] = [];
const octaves: string[] = [];
for (const c of day.commemorations) {
if (c.kind === 'sanctoral') {
sanctoral.push(c.name);
} else if (c.kind === 'temporal') {
if (c.id === temporalId) {
temporal.push(anchorDayName(day, false) ?? temporalLabel(day));
}
} else if (opts.showOctaves && c.id !== opts.excludeOctaveId) {
const octave = activeOctaves.find((a) => a.id === c.id);
octaves.push(octave ? octaveCommemorationLabel(octave) : c.name);
}
}
return { sanctoral, temporal, octaves };
} }
const RANK_LABELS: Record<FeastClass, string> = { const RANK_LABELS: Record<FeastClass, string> = {
@@ -319,49 +341,54 @@ const TEMPORAL_CATEGORY_RANK_LABELS: Record<TemporalCategory, string> = {
}; };
/** /**
* The full "day being celebrated" label: a feast name when * The full "day being celebrated" label: the day's own primary identity
* calendar/commemorations.ts says the day has one, combined with (or * (a sanctoral winner, a named temporal feast, a season's own anchor day,
* replaced by) the ordinal temporal label depending on whether the feast * an octave governing the day, or the plain ordinal temporal label — in
* won outright or was merely commemorated. See the plan discussion this * that precedence order) plus whatever `collectCommemorations` finds
* came from for the three cases. * eligible to ride along with it. Each branch below only decides two
* things: what the primary label is, and what commemoration *groups* are
* eligible here and in what order — the actual filtering/formatting work
* is `collectCommemorations`'s alone, shared by every branch.
*/ */
export function getDayLabel(day: LiturgicalDay): string { export function getDayLabel(day: LiturgicalDay): string {
if (day.winner.kind === 'sanctoral') { if (day.winner.kind === 'sanctoral') {
// A sanctoral winner can still share the day with an active octave // Octaves only ride along here on `ordinary-feria` — a day with real
// it didn't come from (e.g. winning a tie-break against one octave // standing of its own (a Sunday, a privileged feria) doesn't mention
// while a second, unrelated octave is also active) — append those, // an unrelated active octave even though it's technically active
// same "winner is primary, commemorations ride along" shape every // (live-verified: Aug 16, 2026, St. Joachim wins outright on a Sunday
// other branch below already uses. Gated on `ordinary-feria`, same // that's also within both St. Lawrence's and the Assumption's octave
// as the octave-headline branch further down: a day with real // windows, and Divino Afflatu 1954's own commemoration line names
// standing of its own (e.g. Trinity Sunday, which is incidentally // only the Sunday, no octave).
// also day 8 of Pentecost's own octave) never mentions an octave — const { sanctoral, temporal, octaves } = collectCommemorations(day, {
// same "nobody calls it that" convention anchorDayName's own doc showOctaves: day.temporalCategory === 'ordinary-feria',
// comment already established for the anchor-day case. });
const otherOctaves = day.temporalCategory === 'ordinary-feria' ? commemoratedOctaveDayLabels(day, undefined) : [];
const winnerName = `${day.winner.name} (${formatRank(day.winner.rank)})`; const winnerName = `${day.winner.name} (${formatRank(day.winner.rank)})`;
return [winnerName, ...otherOctaves].join(' — '); return [winnerName, ...temporal, ...sanctoral, ...octaves].join(' — ');
} }
// A named temporal feast (Christmas, Pentecost, Marian Saturday, ...) // A named temporal feast (Christmas, Pentecost, Marian Saturday, ...)
// shows its own name rather than the ordinal week label — same // shows its own name rather than the ordinal week label — same
// "winner displaces, doesn't combine" rule a sanctoral winner gets // "winner displaces, doesn't combine" rule a sanctoral winner gets
// above. Most temporal ids don't have a record at all (see // above. Most temporal ids don't have a record at all (see
// temporal-feasts.ts) and fall through to the ordinal label as before. // temporal-feasts.ts) and fall through further down.
const namedFeast = getTemporalFeastRecord(day.winner.id); const namedFeast = getTemporalFeastRecord(day.winner.id);
if (namedFeast) { if (namedFeast) {
return namedFeast.rank ? `${namedFeast.name} (${formatRank(namedFeast.rank)})` : namedFeast.name; const primary = namedFeast.rank ? `${namedFeast.name} (${formatRank(namedFeast.rank)})` : namedFeast.name;
const { sanctoral } = collectCommemorations(day, { showOctaves: false });
return [primary, ...sanctoral].join(' — ');
} }
const commemoratedSaint = day.commemorations.find((c) => c.kind === 'sanctoral');
// A season's own named anchor day (Trinity Sunday, Easter, Ash // A season's own named anchor day (Trinity Sunday, Easter, Ash
// Wednesday, Epiphany) outranks an active octave, same reasoning as // Wednesday, Epiphany) outranks an active octave, same reasoning as
// anchorDayName's own doc comment — checked before the octave case // anchorDayName's own doc comment — checked before the octave case
// below since Trinity Sunday, e.g., also happens to be day 8 of // below since Trinity Sunday, e.g., also happens to be day 8 of
// Pentecost's octave, and the anchor name is what actually governs. // Pentecost's octave, and the anchor name is what actually governs.
// Existing convention: a commemorated saint *leads* here, before the
// anchor name — not "winner first" like every branch above.
const anchorName = anchorDayName(day); const anchorName = anchorDayName(day);
if (anchorName) { if (anchorName) {
return commemoratedSaint ? `${commemoratedSaint.name}${anchorName}` : anchorName; const { sanctoral } = collectCommemorations(day, { showOctaves: false });
return [...sanctoral, anchorName].join(' — ');
} }
// An active octave (St. Lawrence's, ...) is this day's real primary // An active octave (St. Lawrence's, ...) is this day's real primary
@@ -387,20 +414,20 @@ export function getDayLabel(day: LiturgicalDay): string {
// disagree. When more than one octave is active at once // disagree. When more than one octave is active at once
// (resolveActiveOctave), the highest-ranked wins the headline (ties // (resolveActiveOctave), the highest-ranked wins the headline (ties
// broken by whichever started more recently) — every other active // broken by whichever started more recently) — every other active
// octave still gets named too (otherActiveOctaveNames), not dropped: // octave still gets named too, not dropped: live-verified real case,
// live-verified real case, Aug 17 -- St. Lawrence's own elevated // Aug 17 -- St. Lawrence's own elevated closing day wins the headline,
// closing day wins the headline, but the Assumption's own day 3 (a // but the Assumption's own day 3 (a real, distinct, simultaneously-
// real, distinct, simultaneously-active octave, not a duplicate of // active octave, not a duplicate of Lawrence's) still belongs in the
// Lawrence's) still belongs in the label alongside St. Hyacinth's // label alongside St. Hyacinth's commemoration.
// commemoration.
const activeOctave = const activeOctave =
day.temporalCategory === 'ordinary-feria' ? resolveActiveOctave(day.date) : octaveGoverningPrivilegedDay(day); day.temporalCategory === 'ordinary-feria' ? resolveActiveOctave(day.date) : octaveGoverningPrivilegedDay(day);
if (activeOctave) { if (activeOctave) {
const { sanctoral, octaves } = collectCommemorations(day, { showOctaves: true, excludeOctaveId: activeOctave.id });
const primary = octaveLabel(activeOctave); const primary = octaveLabel(activeOctave);
const rest = [...otherActiveOctaveNames(day, activeOctave.id), ...(commemoratedSaint ? [commemoratedSaint.name] : [])]; return [primary, ...octaves, ...sanctoral].join(' — ');
return [primary, ...rest].join(' — ');
} }
const temporal = `${temporalLabel(day)} (${TEMPORAL_CATEGORY_RANK_LABELS[day.temporalCategory]})`; const temporal = `${temporalLabel(day)} (${TEMPORAL_CATEGORY_RANK_LABELS[day.temporalCategory]})`;
return commemoratedSaint ? `${commemoratedSaint.name}${temporal}` : temporal; const { sanctoral } = collectCommemorations(day, { showOctaves: false });
return [...sanctoral, temporal].join(' — ');
} }
+10
View File
@@ -78,6 +78,16 @@ export interface SaintRecord {
/** See calendar/types.ts's OctaveConfig doc comment. Absent for the vast /** See calendar/types.ts's OctaveConfig doc comment. Absent for the vast
* majority of saints — only ones with a real octave declare it. */ * majority of saints — only ones with a real octave declare it. */
octave?: OctaveConfig; octave?: OctaveConfig;
/** For a `rank: vigil` record only — the real id of the feast this is
* the eve of (e.g. `st-andrew`, not derivable from this record's own id
* by stripping a `vigil-of-` prefix: several vigils' ids don't match
* their feast's id exactly — `vigil-of-the-assumption` vs `assumption`,
* `vigil-of-st-james` vs `st-james-the-greater`). Lets
* calendar/vespers.ts's evening-anticipation merge recognize "today's
* Vigil is being displaced by the very feast it's the eve of" precisely
* (rather than guessing from date adjacency alone) and skip
* commemorating the Vigil redundantly alongside its own feast. */
vigilOf?: string;
} }
const sanctoralCalendar = sanctoralCalendarData as { days: Record<string, string[]> }; const sanctoralCalendar = sanctoralCalendarData as { days: Record<string, string[]> };
+17
View File
@@ -197,6 +197,23 @@ function applyChristmasOctaveSunday(
const day = Number(dayStr); const day = Number(dayStr);
if (day >= 26 && day <= 29 && weekday === 'sunday') { if (day >= 26 && day <= 29 && weekday === 'sunday') {
// The displaced saint isn't commemorated in place (per this
// function's own doc comment, "he reappears in full on Dec 30
// instead") — strip the sanctoral commemoration `decideOccurrence`
// already pushed for him before this override ran, the same
// candidate the Dec 30 branch below will look up again to revive.
// Only became reachable once `commemorations.ts`'s `ordinary-sunday`
// case started commemorating Semiduplex/Simplex in place instead of
// transferring them (see its own doc comment) — before that fix, a
// `transfer` signal carried the candidate forward instead of a
// commemoration, so there was nothing here to strip.
const displaced = getSanctoralCandidatesFor(isoDate)[0];
if (displaced) {
const idx = commemorations.findIndex((c) => c.kind === 'sanctoral' && c.id === displaced.id);
if (idx !== -1) {
commemorations.splice(idx, 1);
}
}
return { kind: 'temporal', id: 'christmas-octave-sunday' }; return { kind: 'temporal', id: 'christmas-octave-sunday' };
} }
+34 -1
View File
@@ -13,6 +13,7 @@ import { resolveDay } from './index';
import { addDays } from './date-math'; import { addDays } from './date-math';
import { easterOffsetOf } from './temporal'; import { easterOffsetOf } from './temporal';
import { isAtLeast } from './commemorations'; import { isAtLeast } from './commemorations';
import { getSaintRecord } from './feasts';
/** /**
* Fixed/movable "feasts of the Lord" load-bearing elsewhere in this app * Fixed/movable "feasts of the Lord" load-bearing elsewhere in this app
@@ -95,6 +96,38 @@ function tagVespersFrom(tomorrow: LiturgicalDay): LiturgicalDay {
return { ...tomorrow, winner: { ...tomorrow.winner, vespersFrom: 'firstVespersOfTomorrow' } }; return { ...tomorrow, winner: { ...tomorrow.winner, vespersFrom: 'firstVespersOfTomorrow' } };
} }
/** Today's own Vigil isn't commemorated alongside the very feast it's the
* eve of — e.g. Nov 29's Vigil of St. Andrew shouldn't also show up next
* to St. Andrew himself once this evening has already adopted his First
* Vespers, whether St. Andrew governs it outright or is merely
* commemorated there himself (2025-11-30: he's only commemorated under
* Advent I, a `privileged-sunday`, per commemorations.ts's own threshold
* — the Vigil would otherwise show up redundantly alongside him even
* though neither one is tomorrow's actual winner). Matched via each
* Vigil's own explicit `vigilOf` field (calendar/feasts.ts's
* `SaintRecord`) against tomorrow's winner *and* its commemorations, not
* date adjacency or name-guessing — several vigils' own ids don't map
* cleanly to their feast's id (`vigil-of-the-assumption` vs `assumption`,
* `vigil-of-st-james` vs `st-james-the-greater`), so this needs the
* explicit link. Scoped to this evening-anticipation merge specifically,
* not `commemorationOf` itself — the reverse direction
* (`keepsOwnSecondVespers`, commemorating *tomorrow's* Vigil while today
* keeps its own Vespers) can't hit this collision: a Vigil dated tomorrow
* belongs to a feast the day after tomorrow, never today. */
function isVigilOfTomorrow(today: LiturgicalDay, tomorrow: LiturgicalDay): boolean {
if (today.winner.kind !== 'sanctoral' || today.winner.rank !== 'vigil') {
return false;
}
const feastId = getSaintRecord(today.winner.id)?.vigilOf;
if (!feastId) {
return false;
}
return (
(tomorrow.winner.kind === 'sanctoral' && tomorrow.winner.id === feastId) ||
tomorrow.commemorations.some((c) => c.kind === 'sanctoral' && c.id === feastId)
);
}
/** The ordinary anticipation path: tag tomorrow's identity, then layer in /** The ordinary anticipation path: tag tomorrow's identity, then layer in
* today's commemoration if it's eligible (see commemorationOf). Not used * today's commemoration if it's eligible (see commemorationOf). Not used
* by the isMajorFixedFeastOfTheLord override below — whether Christmas/ * by the isMajorFixedFeastOfTheLord override below — whether Christmas/
@@ -104,7 +137,7 @@ function tagVespersFrom(tomorrow: LiturgicalDay): LiturgicalDay {
* commemorations.ts), so it deliberately doesn't inherit this behavior. */ * commemorations.ts), so it deliberately doesn't inherit this behavior. */
function anticipated(today: LiturgicalDay, tomorrow: LiturgicalDay): LiturgicalDay { function anticipated(today: LiturgicalDay, tomorrow: LiturgicalDay): LiturgicalDay {
const tagged = tagVespersFrom(tomorrow); const tagged = tagVespersFrom(tomorrow);
const commemoration = commemorationOf(today.winner); const commemoration = isVigilOfTomorrow(today, tomorrow) ? undefined : commemorationOf(today.winner);
if (!commemoration) { if (!commemoration) {
return tagged; return tagged;
} }
@@ -4,6 +4,7 @@
id: vigil-of-all-saints id: vigil-of-all-saints
name: "Vigil of All Saints" name: "Vigil of All Saints"
rank: vigil rank: vigil
vigilOf: all-saints
common: common-of-a-vigil common: common-of-a-vigil
propers: "vigil-of-all-saints" propers: "vigil-of-all-saints"
# P/T/S/N: not confirmed via this pass's own file parser (this vigil's # P/T/S/N: not confirmed via this pass's own file parser (this vigil's
@@ -3,6 +3,7 @@
id: vigil-of-ss-simon-and-jude id: vigil-of-ss-simon-and-jude
name: "Vigil of Ss. Simon and Jude" name: "Vigil of Ss. Simon and Jude"
rank: vigil rank: vigil
vigilOf: ss-simon-and-jude
common: common-of-a-vigil common: common-of-a-vigil
propers: "vigil-of-ss-simon-and-jude" propers: "vigil-of-ss-simon-and-jude"
# P/T/S/N: no [Ant Prima]/etc of its own in the source (10-27.txt) -- # P/T/S/N: no [Ant Prima]/etc of its own in the source (10-27.txt) --
@@ -6,6 +6,7 @@
id: vigil-of-st-andrew id: vigil-of-st-andrew
name: "Vigil of St. Andrew" name: "Vigil of St. Andrew"
rank: vigil rank: vigil
vigilOf: st-andrew
common: common-of-a-vigil common: common-of-a-vigil
propers: null propers: null
collectCommon: collect-c1v collectCommon: collect-c1v
@@ -8,6 +8,7 @@
id: vigil-of-st-bartholomew id: vigil-of-st-bartholomew
name: "Vigil of St. Bartholomew" name: "Vigil of St. Bartholomew"
rank: vigil rank: vigil
vigilOf: st-bartholomew
common: common-of-a-vigil common: common-of-a-vigil
propers: null propers: null
collectCommon: collect-c1v collectCommon: collect-c1v
@@ -6,6 +6,7 @@
id: vigil-of-st-james id: vigil-of-st-james
name: "Vigil of St. James the Greater" name: "Vigil of St. James the Greater"
rank: vigil rank: vigil
vigilOf: st-james-the-greater
common: common-of-a-vigil common: common-of-a-vigil
propers: null propers: null
collectCommon: collect-c1v collectCommon: collect-c1v
@@ -6,6 +6,7 @@
id: vigil-of-st-john-the-baptist id: vigil-of-st-john-the-baptist
name: "Vigil of St. John the Baptist" name: "Vigil of St. John the Baptist"
rank: vigil rank: vigil
vigilOf: nativity-of-st-john-the-baptist
common: common-of-a-vigil common: common-of-a-vigil
propers: "vigil-of-st-john-the-baptist" propers: "vigil-of-st-john-the-baptist"
# P/T/S/N: not confirmed via this pass's own file parser (this vigil's # P/T/S/N: not confirmed via this pass's own file parser (this vigil's
@@ -6,6 +6,7 @@
id: vigil-of-st-lawrence id: vigil-of-st-lawrence
name: "Vigil of St. Lawrence" name: "Vigil of St. Lawrence"
rank: vigil rank: vigil
vigilOf: st-lawrence
common: common-of-a-vigil common: common-of-a-vigil
propers: "vigil-of-st-lawrence" propers: "vigil-of-st-lawrence"
# Benedictus antiphon live-verified (2026-08, Lauds query, 2025-08-09, winner # Benedictus antiphon live-verified (2026-08, Lauds query, 2025-08-09, winner
@@ -13,6 +13,7 @@
id: vigil-of-st-matthew id: vigil-of-st-matthew
name: "Vigil of St. Matthew" name: "Vigil of St. Matthew"
rank: vigil rank: vigil
vigilOf: st-matthew
common: common-of-a-vigil common: common-of-a-vigil
propers: null propers: null
collectCommon: collect-c1v collectCommon: collect-c1v
@@ -7,6 +7,7 @@
id: vigil-of-st-matthias id: vigil-of-st-matthias
name: "Vigil of St. Matthias" name: "Vigil of St. Matthias"
rank: vigil rank: vigil
vigilOf: st-matthias
common: common-of-a-vigil common: common-of-a-vigil
propers: null propers: null
collectCommon: collect-c1v collectCommon: collect-c1v
@@ -11,6 +11,7 @@
id: vigil-of-st-thomas id: vigil-of-st-thomas
name: "Vigil of St. Thomas" name: "Vigil of St. Thomas"
rank: vigil rank: vigil
vigilOf: st-thomas-apostle
common: common-of-a-vigil common: common-of-a-vigil
propers: null propers: null
collectCommon: collect-c1v collectCommon: collect-c1v
@@ -6,6 +6,7 @@
id: vigil-of-the-assumption id: vigil-of-the-assumption
name: "Vigil of the Assumption of the Blessed Virgin Mary" name: "Vigil of the Assumption of the Blessed Virgin Mary"
rank: vigil rank: vigil
vigilOf: assumption
common: common-of-a-vigil common: common-of-a-vigil
propers: "vigil-of-the-assumption" propers: "vigil-of-the-assumption"
benedictusCommon: common-of-a-vigil benedictusCommon: common-of-a-vigil
+6 -1
View File
@@ -11,7 +11,12 @@ describe('Christ the King (applyChristTheKing)', () => {
const day = resolveDay('2026-10-25'); // last Sunday of October 2026 const day = resolveDay('2026-10-25'); // last Sunday of October 2026
expect(day.winner).toEqual({ kind: 'temporal', id: 'christ-the-king' }); expect(day.winner).toEqual({ kind: 'temporal', id: 'christ-the-king' });
expect(day.commemorations).toContainEqual({ kind: 'temporal', id: 'post-pentecost-22' }); expect(day.commemorations).toContainEqual({ kind: 'temporal', id: 'post-pentecost-22' });
expect(getDayLabel(day)).toBe('Christ the King (Duplex I Class)'); // Live-verified (Divino Afflatu 1954): the day's own commemoration
// line also names whichever sanctoral entry the ordinary Sunday was
// already carrying (Ss. Chrysanthus and Daria, Simplex, per the next
// test below) -- this app's day label now surfaces every commemorated
// saint, not just the Sunday itself.
expect(getDayLabel(day)).toBe('Christ the King (Duplex I Class) — Ss. Chrysanthus and Daria, Martyrs');
}); });
it('preserves a nested commemoration: a Simplex saint already commemorated under the ordinary Sunday stays commemorated', () => { it('preserves a nested commemoration: a Simplex saint already commemorated under the ordinary Sunday stays commemorated', () => {
+5
View File
@@ -123,6 +123,11 @@ describe('decideOccurrence — ordinary-sunday', () => {
}); });
it('semiduplex gets nothing here — transfers forward', () => { it('semiduplex gets nothing here — transfers forward', () => {
// Per direct instruction: a Semiduplex feast on an ordinary Sunday is
// pushed off to the next open day (typically the Monday right after)
// rather than merely commemorated — see decideOccurrence's own
// `ordinary-sunday` case for the two-part transfer mechanism this
// signal feeds into.
const result = decideOccurrence('ordinary-sunday', 'post-epiphany-2', saint('semiduplex')); const result = decideOccurrence('ordinary-sunday', 'post-epiphany-2', saint('semiduplex'));
expect(result.winner).toEqual({ kind: 'temporal', id: 'post-epiphany-2' }); expect(result.winner).toEqual({ kind: 'temporal', id: 'post-epiphany-2' });
expect(result.commemorations).toEqual([]); expect(result.commemorations).toEqual([]);
+82 -21
View File
@@ -23,8 +23,13 @@ describe('getDayLabel — ordinal temporal label', () => {
// here per the normal ordinary-Sunday rule (see // here per the normal ordinary-Sunday rule (see
// tests/calendar/transfer.test.ts's own May 31 case for the full // tests/calendar/transfer.test.ts's own May 31 case for the full
// winner/commemorations breakdown), so the label now reflects her, // winner/commemorations breakdown), so the label now reflects her,
// not Trinity Sunday itself. // not Trinity Sunday itself — but Trinity Sunday is still
expect(getDayLabel(resolveDay('2026-05-31'))).toBe('The Queenship of the Blessed Virgin Mary (Duplex II Class)'); // commemorated in return (`decideOccurrence`'s own `ordinary-sunday`
// branch), by bare name only — a commemoration never carries a rank
// parenthetical, only the day's own winner does.
expect(getDayLabel(resolveDay('2026-05-31'))).toBe(
'The Queenship of the Blessed Virgin Mary (Duplex II Class) — Trinity Sunday',
);
expect(getDayLabel(resolveDay('2026-04-05'))).toBe('Easter (Duplex I Class)'); expect(getDayLabel(resolveDay('2026-04-05'))).toBe('Easter (Duplex I Class)');
expect(getDayLabel(resolveDay('2026-02-18'))).toBe('Ash Wednesday'); expect(getDayLabel(resolveDay('2026-02-18'))).toBe('Ash Wednesday');
}); });
@@ -77,17 +82,27 @@ describe('getDayLabel — resumed post-Epiphany Sunday (overflow years)', () =>
); );
// 2024-11-11 is St. Martin of Tours (Duplex, pre-existing content) -- // 2024-11-11 is St. Martin of Tours (Duplex, pre-existing content) --
// an ordinary (non-privileged) Monday fully yields to a real winning // an ordinary (non-privileged) Monday fully yields to a real winning
// saint, so the label is just his name, not the ferial fallback; see // saint, so the label is just his name (plus St. Menna, Simplex, also
// the 2035-10-29 assertion below for that fallback format on a // real and commemorated alongside him -- live-verified, Divino
// genuinely saint-free overflow-week Monday instead (no single // Afflatu 1954), not the ferial fallback; see the 2035-10-29 assertion
// Nov-dated Monday near this Sunday pair is clean any more, now that // below for that fallback format on a genuinely saint-free
// Nov 4/8/15/16/20 are all fixed real content). // overflow-week Monday instead (no single Nov-dated Monday near this
expect(getDayLabel(resolveDay('2024-11-11'))).toBe('St. Martin of Tours, Bishop and Confessor (Duplex Majus)'); // Sunday pair is clean any more, now that Nov 4/8/15/16/20 are all
// fixed real content).
expect(getDayLabel(resolveDay('2024-11-11'))).toBe(
'St. Martin of Tours, Bishop and Confessor (Duplex Majus) — St. Menna, Martyr',
);
expect(getDayLabel(resolveDay('2024-11-17'))).toBe('The 6th Sunday after Epiphany (Semiduplex)'); expect(getDayLabel(resolveDay('2024-11-17'))).toBe('The 6th Sunday after Epiphany (Semiduplex)');
// 2024-11-18 is the Dedication of the Basilicas of Ss. Peter and Paul // 2024-11-18 is the Dedication of the Basilicas of Ss. Peter and Paul
// (pre-existing fixed content) -- again a real winning saint, not the // (pre-existing fixed content) -- again a real winning saint, not the
// ferial fallback. // ferial fallback -- with St. Gregory Thaumaturgus (Semiduplex,
expect(getDayLabel(resolveDay('2024-11-18'))).toBe('Dedication of the Basilicas of Ss. Peter and Paul (Duplex)'); // native to Nov 17 above) commemorated alongside it instead: per
// direct instruction, a Semiduplex feast on an ordinary Sunday
// transfers to the next open day rather than being commemorated in
// place, and Nov 18 is that day.
expect(getDayLabel(resolveDay('2024-11-18'))).toBe(
'Dedication of the Basilicas of Ss. Peter and Paul (Duplex) — St. Gregory Thaumaturgus, Bishop and Confessor',
);
// 2035-10-29, a Monday in the 3rd week of a different overflow // 2035-10-29, a Monday in the 3rd week of a different overflow
// stretch, is genuinely clean (no sanctoral entry, no commemoration) // stretch, is genuinely clean (no sanctoral entry, no commemoration)
// -- covers the ferial "Monday in the Nth week after Epiphany" format // -- covers the ferial "Monday in the Nth week after Epiphany" format
@@ -102,15 +117,42 @@ describe('getDayLabel — resumed post-Epiphany Sunday (overflow years)', () =>
// Every year 1900-2100 lands on this same id for its own last Sunday // Every year 1900-2100 lands on this same id for its own last Sunday
// before Advent, so this ordinal is fixed, not overflow-year-specific // before Advent, so this ordinal is fixed, not overflow-year-specific
// -- confirmed against a non-overflow year (1943) too. // -- confirmed against a non-overflow year (1943) too.
// St. Cecilia (Semiduplex, her real date) transfers off this Sunday
// rather than being commemorated in place -- same rule as St. Gregory
// Thaumaturgus above -- landing on 2026-11-23 instead, where St.
// Clement already natively wins; Cecilia loses that tied collision
// (both Semiduplex) and joins St. Felicitas as a commemoration there.
expect(getDayLabel(resolveDay('2026-11-22'))).toBe('The 23rd Sunday after Trinity (Semiduplex)'); expect(getDayLabel(resolveDay('2026-11-22'))).toBe('The 23rd Sunday after Trinity (Semiduplex)');
expect(getDayLabel(resolveDay('2026-11-23'))).toBe(
'St. Clement I, Pope and Martyr (Semiduplex) — St. Felicitas, Martyr — St. Cecilia, Virgin and Martyr',
);
// 1943-11-21 is also the Presentation of the BVM (Duplex Majus, added // 1943-11-21 is also the Presentation of the BVM (Duplex Majus, added
// 2026-08 — see presentation-of-the-bvm.yml), which meets this app's // 2026-08 — see presentation-of-the-bvm.yml). It's `ordinary-sunday`
// existing privileged-Sunday rank threshold (commemorations.ts's // here (this app's Trinitytide Sundays, including the fixed final
// `privileged-sunday` case requires only duplex-majus+) and so wins // one, carry no special first-class standing of their own), so
// outright rather than being commemorated — a pre-existing rule, not // commemorations.ts's `ordinary-sunday` case's plain Duplex+ threshold
// new behavior from adding her. 2026-11-22 above (no saint collision) // is what lets her win outright rather than being commemorated — a
// still covers the fixed-ordinal label itself. // pre-existing rule, not new behavior from adding her. This case
expect(getDayLabel(resolveDay('1943-11-21'))).toBe('The Presentation of the Blessed Virgin Mary (Duplex Majus)'); // additionally confirms the displaced Sunday is still commemorated in
// return, using the same fixed 23rd-after-Trinity ordinal, not a raw
// elapsed-week count recomputed for 1943.
expect(getDayLabel(resolveDay('1943-11-21'))).toBe(
'The Presentation of the Blessed Virgin Mary (Duplex Majus) — The 23rd Sunday after Trinity',
);
});
});
describe('getDayLabel — commemorated Sunday/feria under a sanctoral winner', () => {
it('a saint winning outright on a privileged-feria-minor day still leaves that feria commemorated', () => {
// 2027-12-07, a Tuesday of Advent: St. Ambrose (Duplex) clears
// privileged-feria-minor's own Semiduplex+ threshold and wins
// outright, but Advent's own feria is still commemorated in return
// (`decideOccurrence`'s `privileged-feria-minor` branch) -- live-
// verified shape, same mechanism as the ordinary-Sunday case above,
// for the feria-tier branch instead.
expect(getDayLabel(resolveDay('2027-12-07'))).toBe(
'St. Ambrose, Bishop, Confessor and Doctor of the Church (Duplex) — Tuesday in the 2nd week of Advent',
);
}); });
}); });
@@ -171,20 +213,39 @@ describe('getDayLabel — active octave', () => {
// occurring saint (see octaves.test.ts and the December/September // occurring saint (see octaves.test.ts and the December/September
// sanctoral tests for those counterexamples). The Assumption's own // sanctoral tests for those counterexamples). The Assumption's own
// day 3 (semiduplex, genuinely active but outranked by Lawrence's // day 3 (semiduplex, genuinely active but outranked by Lawrence's
// elevated duplex) still gets named, not dropped, alongside it. // elevated duplex) still gets named, not dropped, alongside it -- with
// its own full "Nth Day within the Octave of X" phrasing, not a bare
// name: live-verified directly (Divino Afflatu 1954, where Aug 17's
// real winner is Hyacinth himself, not Lawrence's octave -- a
// different rubric-track outcome, but the same commemoration phrasing
// question): "Commemoratio: Tertia die infra Octavam S. Assumptionis
// Beatæ Mariæ Virginis", not a bare "The Assumption of the Blessed
// Virgin Mary".
expect(getDayLabel(resolveDay('2026-08-17'))).toBe( expect(getDayLabel(resolveDay('2026-08-17'))).toBe(
'Octave of St. Lawrence, Martyr (Duplex) — The Assumption of the Blessed Virgin Mary — St. Hyacinth, Confessor', 'Octave of St. Lawrence, Martyr (Duplex) — 3rd Day within the Octave of The Assumption of the Blessed Virgin Mary — St. Hyacinth, Confessor',
); );
expect(getDayLabel(resolveDay('2026-08-18'))).toBe( expect(getDayLabel(resolveDay('2026-08-18'))).toBe(
'4th Day within the Octave of The Assumption of the Blessed Virgin Mary (Semiduplex)', '4th Day within the Octave of The Assumption of the Blessed Virgin Mary (Semiduplex)',
); );
}); });
it('a real Sunday with standing of its own wins over both octaves entirely, showing the plain ordinal Sunday label -- not an octave name at all', () => { it('a sanctoral winner on a Sunday still leaves the Sunday commemorated, but neither octave it also happens to overlap -- not an octave name at all', () => {
// 2026-08-16 is a Sunday genuinely within both St. Lawrence's and the // 2026-08-16 is a Sunday genuinely within both St. Lawrence's and the
// Assumption's overlapping octave windows. // Assumption's overlapping octave windows -- St. Joachim (Duplex II
// Class) wins outright per the ordinary-Sunday Duplex+ threshold, not
// the Sunday itself (this test's own name was wrong about that before
// this case existed). Live-verified against Divino Afflatu 1954: the
// commemoration line reads only "Dominica XII Post Pentecosten" (this
// app's own Trinity-counted display is one week off from that
// Pentecost-counted number, so "11th ... after Trinity" here) -- no
// octave named at all, even though both are technically active, same
// as this app's own established `ordinary-feria`-only gate for
// octave mentions alongside a sanctoral winner.
const day = resolveDay('2026-08-16'); const day = resolveDay('2026-08-16');
expect(day.weekday).toBe('sunday'); expect(day.weekday).toBe('sunday');
expect(getDayLabel(day)).toBe(
'St. Joachim, Confessor, Father of the Blessed Virgin Mary (Duplex II Class) — The 11th Sunday after Trinity',
);
expect(getDayLabel(day)).not.toContain('Octave'); expect(getDayLabel(day)).not.toContain('Octave');
}); });
+3 -1
View File
@@ -48,7 +48,9 @@ describe('January sanctoral pull (first pass)', () => {
it('a simplex saint on an ordinary Sunday is commemorated, not dropped or made to win', () => { it('a simplex saint on an ordinary Sunday is commemorated, not dropped or made to win', () => {
// Jan 14, 2029 is the Second Sunday after Epiphany (ordinary, not // Jan 14, 2029 is the Second Sunday after Epiphany (ordinary, not
// privileged) — St. Felix (simplex) is commemorated per the ordinary- // privileged) — St. Felix (simplex) is commemorated per the ordinary-
// Sunday rule, matching the historical calendar exactly. // Sunday rule, matching the historical calendar exactly. St. Hilary of
// Poitiers (Semiduplex, also native to this date) transfers off the
// Sunday instead, per direct instruction, so he doesn't appear here.
const day = resolveDay('2029-01-14'); const day = resolveDay('2029-01-14');
expect(day.winner).toEqual({ kind: 'temporal', id: 'post-epiphany-2' }); expect(day.winner).toEqual({ kind: 'temporal', id: 'post-epiphany-2' });
expect(day.commemorations).toEqual([ expect(day.commemorations).toEqual([
+4 -3
View File
@@ -35,9 +35,10 @@ describe('July sanctoral pull (first pass)', () => {
it('the Vigil of St. James resolves alongside its own commemorated saint, distinct from St. James Day itself', () => { it('the Vigil of St. James resolves alongside its own commemorated saint, distinct from St. James Day itself', () => {
const day = resolveDay('2028-07-24'); const day = resolveDay('2028-07-24');
expect(day.winner.kind).toBe('sanctoral'); expect(day.winner.kind).toBe('sanctoral');
// 2028's Jul 23 is a Sunday, so St. Apollinaris transfers forward into // 2028's Jul 23 is a Sunday, so St. Apollinaris (Semiduplex) transfers
// this day and wins the collision against the Vigil/St. Christina — // forward into this day and wins the collision against the Vigil/St.
// real transfer+collision interaction, not a data error. // Christina — per direct instruction, a Semiduplex feast on an
// ordinary Sunday transfers rather than being commemorated in place.
expect(day.commemorations.map((c) => (c.kind === 'sanctoral' ? c.id : null)).sort()).toEqual([ expect(day.commemorations.map((c) => (c.kind === 'sanctoral' ? c.id : null)).sort()).toEqual([
'st-christina', 'st-christina',
'vigil-of-st-james', 'vigil-of-st-james',
+15 -3
View File
@@ -54,6 +54,11 @@ describe('November sanctoral pull (first pass)', () => {
}); });
it('St. Clement transfers forward into St. Chrysogonus\'s day whenever his own date falls on a Sunday -- a single-day transfer this app models correctly, unlike August\'s multi-day-skip case', () => { it('St. Clement transfers forward into St. Chrysogonus\'s day whenever his own date falls on a Sunday -- a single-day transfer this app models correctly, unlike August\'s multi-day-skip case', () => {
// Per direct instruction: a Semiduplex feast (St. Clement) on an
// ordinary Sunday transfers to the next open day rather than being
// commemorated in place -- St. Felicitas (Simplex, also native to
// Nov 23) stays behind and is commemorated under the Sunday itself,
// since Simplex still gets the plain-commemoration treatment.
const clean = resolveDay('2032-11-24'); // Nov 23, 2032 is not a Sunday const clean = resolveDay('2032-11-24'); // Nov 23, 2032 is not a Sunday
expect(clean.winner).toEqual({ expect(clean.winner).toEqual({
kind: 'sanctoral', kind: 'sanctoral',
@@ -61,14 +66,21 @@ describe('November sanctoral pull (first pass)', () => {
name: 'St. Chrysogonus, Martyr', name: 'St. Chrysogonus, Martyr',
rank: 'simplex', rank: 'simplex',
}); });
const transferred = resolveDay('2025-11-24'); // Nov 23, 2025 IS a Sunday const onceASunday = resolveDay('2025-11-23'); // a Sunday
expect(transferred.winner).toEqual({ expect(onceASunday.winner).toEqual({ kind: 'temporal', id: 'post-pentecost-24' });
expect(onceASunday.commemorations).toEqual([
{ kind: 'sanctoral', id: 'st-felicitas', name: 'St. Felicitas, Martyr', rank: 'simplex' },
]);
// St. Clement transfers into Nov 24 and wins the collision against
// St. Chrysogonus (native there, Simplex).
const followingDay = resolveDay('2025-11-24');
expect(followingDay.winner).toEqual({
kind: 'sanctoral', kind: 'sanctoral',
id: 'st-clement', id: 'st-clement',
name: 'St. Clement I, Pope and Martyr', name: 'St. Clement I, Pope and Martyr',
rank: 'semiduplex', rank: 'semiduplex',
}); });
expect(transferred.commemorations).toEqual([ expect(followingDay.commemorations).toEqual([
{ kind: 'sanctoral', id: 'st-chrysogonus', name: 'St. Chrysogonus, Martyr', rank: 'simplex' }, { kind: 'sanctoral', id: 'st-chrysogonus', name: 'St. Chrysogonus, Martyr', rank: 'simplex' },
]); ]);
}); });
+6 -1
View File
@@ -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', () => { 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 // Nov 30, 2025 is Advent I Sunday -- also St. Andrew's own day
// (Duplex II. classis), correctly commemorated alongside it since the // (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 eve = resolveOrdo('compline', '2025-11-29');
const last = eve.parts[eve.parts.length - 1]; const last = eve.parts[eve.parts.length - 1];
expect(last?.kind === 'preces' ? last.label : undefined).toBe('Alma Redemptoris Mater'); expect(last?.kind === 'preces' ? last.label : undefined).toBe('Alma Redemptoris Mater');