Generalize movable-feast anchors beyond Easter offsets, migrate Christ the King
Deploy / deploy (push) Successful in 1m18s
Deploy / deploy (push) Successful in 1m18s
Extends TemporalFeastRecord's date anchor from a single easterOffset number into a MovableAnchor union: 'easter' (unchanged), plus 'nth-sunday-of-month' (nth: -1 for "last") and 'nth-sunday-of-advent' -- both new anchor kinds resolve to "Nth Sunday counting from an anchor date," just with a different anchor (first-of-month vs. Advent's own start, which is itself always a Sunday). Adds calendar/temporal.ts's sundayOnOrAfter to support the month case. Migrates christ-the-king.yml onto the new nth-sunday-of-month anchor (month: 10, nth: -1) with a new `unconditional: true` flag replacing its old always-wins-no-rank-check bespoke function -- retiring applyChristTheKing and its lastSundayOfOctober helper from calendar/index.ts entirely. Down to two bespoke override functions left (marian-saturday's date-less fallback, christmas-octave-sunday's fixed-date-range Sunday search), both structurally different from the Nth-Sunday-from-anchor shape this table now covers. No behavior change -- the full existing Christ the King test suite passes unchanged through the new generic path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZSAgRi4QE4XRTqVto93zA
This commit is contained in:
@@ -3,7 +3,14 @@
|
||||
# instead (the Monastic-lineage version of the era that actually carries
|
||||
# it), confirmed live: last Sunday of October, Duplex I. classis,
|
||||
# commemorating whichever Sunday after Pentecost it would otherwise be.
|
||||
# See calendar/index.ts's applyChristTheKing for the occurrence rule.
|
||||
# Per direct instruction, `unconditional: true` -- always wins the last
|
||||
# Sunday of October full stop, no rank check at all, unlike every other
|
||||
# movable feast. See calendar/movable-feasts.ts for the occurrence rule.
|
||||
id: christ-the-king
|
||||
name: "Christ the King"
|
||||
rank: duplex-1-classis
|
||||
anchor:
|
||||
kind: nth-sunday-of-month
|
||||
month: 10
|
||||
nth: -1
|
||||
unconditional: true
|
||||
|
||||
@@ -12,4 +12,6 @@
|
||||
id: immaculate-heart-of-mary
|
||||
name: "The Immaculate Heart of the Blessed Virgin Mary"
|
||||
rank: duplex-2-classis
|
||||
easterOffset: 69
|
||||
anchor:
|
||||
kind: easter
|
||||
offset: 69
|
||||
|
||||
Reference in New Issue
Block a user