Import calendar-month/week Matins Nocturn 2 content for Aug-Nov
Deploy / deploy (push) Successful in 1m24s

The later post-Pentecost Sundays' real Nocturn 2 patristic content isn't
keyed by Pentecost offset in the reference engine — it's keyed by civil
calendar month/week (the old "Scriptura occurrens" cycle), which shifts
relative to post-pentecost-NN every year depending on Easter's date. Port
Date.pm's monthday() algorithm (pre-1955/Tridentine rubrics) as a new,
date-driven id, author all 20 August-November month-week files from the
reference engine's Tempora/0MN-0.txt sources, and pool them in
hours/matins.ts as a third, independent reading source alongside the
existing temporalId lookup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EWzE3kaSZCs79fPBrrE1aF
This commit is contained in:
2026-08-23 07:45:37 -04:00
parent 25e2eeb493
commit 72a0f8072e
25 changed files with 1587 additions and 10 deletions
+15 -6
View File
@@ -62,7 +62,7 @@
// full-calendar content pass. See TODO.md for what's deferred.
import type { ResolvedOrdo, ResolvedPart, ResolvedText, ResolvedVerse } from './types';
import type { LiturgicalDay } from '../calendar/types';
import { resolveDay, resolveTemporalId, activeOctavesFor, resolveActiveOctave } from '../calendar';
import { resolveDay, resolveTemporalId, monthWeekId, activeOctavesFor, resolveActiveOctave } from '../calendar';
import { isInTriduum } from '../calendar/temporal';
import { getDayLabel } from '../calendar/day-label';
import { getPsalmVerses } from '../psalter';
@@ -326,11 +326,18 @@ function ferialPsalmodyThreeNocturns(day: LiturgicalDay): [ResolvedPart[], Resol
* gathered for `day` — the office winner (if sanctoral), every
* commemorated saint (a transferred-in feast already appears as `day.winner`
* once `resolveDay` has applied the transfer, so it needs no separate
* lookup here), and the plain temporal id itself (for an ordinary day's own
* lookup here), the plain temporal id itself (for an ordinary day's own
* patristic content, e.g. a plain Sunday's Moralia-in-Job-style
* commentary) — deliberately inclusive, not just the winner, per the
* user's own "be generous, not winner-takes-all" instruction (2026-08). */
function nocturnReadingIds(day: LiturgicalDay, temporalId: string): string[] {
* commentary), and — for dates from the 1st Sunday of August through the
* eve of Advent — the calendar-month/week id (`month-week-<id>`,
* calendar/month-week-id.ts's monthWeekId): the real historical Nocturn 2
* for the later post-Pentecost Sundays is keyed by civil calendar month,
* not Easter offset (see that function's own header for why), so it's
* pooled here as a second, independent source alongside `temporalId`,
* same dual-key precedent as propers/bible-plan.ts's Dec25-Jan13 stretch —
* deliberately inclusive, not just the winner, per the user's own "be
* generous, not winner-takes-all" instruction (2026-08). */
function nocturnReadingIds(day: LiturgicalDay, temporalId: string, date: string): string[] {
const ids = new Set<string>();
// Not gated to `kind === 'sanctoral'` -- a named temporal override (e.g.
// Immaculate Heart of Mary, calendar/movable-feasts.ts's applyMovableFeasts)
@@ -347,6 +354,8 @@ function nocturnReadingIds(day: LiturgicalDay, temporalId: string): string[] {
if (c.kind === 'sanctoral' || c.kind === 'temporal') ids.add(c.id);
}
ids.add(temporalId);
const monthWeek = monthWeekId(date);
if (monthWeek) ids.add(`month-week-${monthWeek}`);
return [...ids];
}
@@ -385,7 +394,7 @@ function buildReadingPool(day: LiturgicalDay, temporalId: string, date: string):
responsory: r.responsory ? { text: r.responsory, status: { la: 'verified', en: 'verified' } } : undefined,
});
}
for (const id of nocturnReadingIds(day, temporalId)) {
for (const id of nocturnReadingIds(day, temporalId, date)) {
for (const reading of getNocturnReadings(id)) {
parts.push(nocturnReadingPart(reading));
}