fix: extend Regina Caeli period through Saturday after Pentecost
All checks were successful
CI / update (push) Successful in 3m32s

The Regina Caeli replaces the Angelus from Easter Sunday through the
Saturday after Pentecost (Easter + 55 days), not just until Ascension.
This commit is contained in:
2026-04-06 21:04:27 +02:00
parent 593f211252
commit 8364a4fb23

View File

@@ -25,16 +25,17 @@ function toMidnight(date: Date): Date {
}
/**
* Check if a date falls within Eastertide (Easter Sunday to Ascension Thursday, inclusive).
* Ascension = Easter + 39 days.
* Check if a date falls within the Regina Caeli period
* (Easter Sunday through Saturday after Pentecost, inclusive).
* Pentecost = Easter + 49 days; Saturday after = Easter + 55 days.
*/
export function isEastertide(date: Date = new Date()): boolean {
const year = date.getFullYear();
const easter = computeEaster(year);
const ascension = new Date(easter);
ascension.setDate(ascension.getDate() + 39);
const satAfterPentecost = new Date(easter);
satAfterPentecost.setDate(satAfterPentecost.getDate() + 55);
const d = toMidnight(date);
return d >= easter && d <= ascension;
return d >= easter && d <= satAfterPentecost;
}
/**