Generalize non-Sunday movable feasts into one Easter-offset resolver
Deploy / deploy (push) Successful in 1m21s
Deploy / deploy (push) Successful in 1m21s
The bespoke applyImmaculateHeart function (following the applyMarianSaturday/ applyChristTheKing precedent of one hand-written override function per feast) doesn't scale: several more feasts are planned that all reduce to "weekday N days from Easter Sunday" (Ember/Rogation days, more Sacred-Heart-family Marian devotions, St. Joseph's pre-1955 Eastertide feast, Lenten Friday Passion devotions), and one-off functions invite subtle ordering bugs -- applyImmaculateHeart had to be sequenced after applyMarianSaturday specifically or it would have been silently clobbered. Replaced with calendar/movable-feasts.ts's generic applyMovableFeasts, which scans calendar/temporal-feasts.ts's existing per-feast YAML records for a new optional `easterOffset` field. Adding the next movable feast is now a new data/calendar/temporal-feasts/<id>.yml file with `rank` and `easterOffset` set, not a new TypeScript function. Same rank-compared, commemorate-the-loser semantics as before, just centralized instead of duplicated per feast. christ-the-king, marian-saturday, and christmas-octave-sunday stay as their own functions -- they're structurally different rules (a fixed month-position search, a date-less fallback default, and a fixed-date- range Sunday search, respectively), not Easter offsets, so force-fitting them into this table wouldn't actually simplify anything. No behavior change -- the existing Immaculate Heart of Mary 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:
@@ -2,13 +2,14 @@
|
||||
# date collided outright with the Assumption's own octave-closing day,
|
||||
# which this project also deliberately keeps (see saints/assumption.yml).
|
||||
# Moved to the Saturday after the Feast of the Sacred Heart (Easter+69,
|
||||
# see calendar/index.ts's applyImmaculateHeart) -- the feast's own real
|
||||
# diocesan date from 1914 until Pius XII's 1944 fixed-date decree, and
|
||||
# also the date Paul VI's 1969 reform returned to, so it has continuity
|
||||
# on both sides of the Aug-22 interlude. Rank/name still sourced from
|
||||
# see calendar/movable-feasts.ts) -- the feast's own real diocesan date
|
||||
# from 1914 until Pius XII's 1944 fixed-date decree, and also the date
|
||||
# Paul VI's 1969 reform returned to, so it has continuity on both sides
|
||||
# of the Aug-22 interlude. Rank/name still sourced from
|
||||
# `web/www/horas/Latin/Sancti/08-22.txt`'s own [Rank] block, same as
|
||||
# before the move -- only the date assignment changed, not the office's
|
||||
# own content.
|
||||
id: immaculate-heart-of-mary
|
||||
name: "The Immaculate Heart of the Blessed Virgin Mary"
|
||||
rank: duplex-2-classis
|
||||
easterOffset: 69
|
||||
|
||||
Reference in New Issue
Block a user