calendar: compute real Easter dates and temporal-cycle seasons

resolveDay() no longer hardcodes season: 'trinitytide'. Easter is
computed via the Anonymous Gregorian algorithm (verified against 16
known reference dates spanning 1583-2100); Advent/Christmastide/
Epiphanytide follow the Christmas-anchored rules (including Advent's
"Sunday nearest Nov 30"); Septuagesima through Trinitytide come from
easter-offsets.yml, reshaped from single named anchor points into real
ranges plus single-day overrides for Corpus Christi and Sacred Heart.

occurring feasts (calendar/feasts.ts) are still a stub — the sanctoral
calendar and Double-vs-not ranking are a separate, larger project.
This commit is contained in:
2026-08-10 05:27:12 -04:00
parent 954edeb7b9
commit 67037469fc
8 changed files with 291 additions and 42 deletions
+7 -8
View File
@@ -1,21 +1,20 @@
import type { LiturgicalDay } from './types';
import { weekdayOf } from './weekday';
import { resolveSeason } from './temporal';
/**
* Resolves everything about a given day *except* hour content — weekday,
* season, and any occurring feasts. Season and occurring feasts are stubs
* until calendar/easter.ts and calendar/feasts.ts land at milestone 4;
* hours that only need weekday (Prime, Compline, Terce, Sext, None) can
* already rely on this fully.
* season, and any occurring feasts. Season is real (see
* calendar/temporal.ts); occurring feasts are still a stub until
* calendar/feasts.ts lands (the sanctoral calendar — which saint, if any,
* is kept on a given day, and Double-vs-not ranking — is a separate,
* larger project from temporal-cycle season resolution).
*/
export function resolveDay(isoDate: string): LiturgicalDay {
return {
date: isoDate,
weekday: weekdayOf(isoDate),
// Placeholder string, not a real resolution — real season/temporal-id
// lookup (data/calendar/easter-offsets.yml + fixed-date-calendar.yml)
// lands at milestone 4.
season: 'trinitytide',
season: resolveSeason(isoDate),
occurring: [],
};
}