calendaryjs-plugin-liturgical
v0.1.6
Published
Catholic liturgical calendar plugin for calendaryjs — Easter computus and movable feasts.
Maintainers
Readme
calendaryjs-plugin-liturgical
New to calendaryjs? Start with the core README — this plugin builds on its engine.
Adds the Roman Catholic liturgical calendar to calendaryjs: Easter (via the Computus algorithm) plus the movable feasts declared as offsets from it, so the whole cycle follows automatically each year.
Install
npm i calendaryjs calendaryjs-plugin-liturgicalUse it
Register the plugin, then declare easter and offset events — an offset is placed
relative to Easter (negative = before, positive = after):
import { calendary } from "calendaryjs";
import { liturgical } from "calendaryjs-plugin-liturgical";
const cal = calendary().use(liturgical());
cal.addGroup({
id: "church",
events: [
{ type: "easter", id: "easter", title: "Easter Sunday" },
{
type: "offset",
id: "ash-wednesday",
baseEvent: "easter",
offsetDays: -46,
title: "Ash Wednesday",
},
{
type: "offset",
id: "palm-sunday",
baseEvent: "easter",
offsetDays: -7,
title: "Palm Sunday",
},
{ type: "offset", id: "pentecost", baseEvent: "easter", offsetDays: 49, title: "Pentecost" },
],
});
cal.getEventsInRange("2025-01-01", "2025-12-31");Common feasts ship as ready-made presets:
import { EASTER, ASH_WEDNESDAY, PALM_SUNDAY, PENTECOST } from "calendaryjs-plugin-liturgical";
cal.addGroup({ id: "church", events: [EASTER, ASH_WEDNESDAY, PALM_SUNDAY, PENTECOST] });Compute Easter directly
import { computeEaster, easterRelativeDate } from "calendaryjs-plugin-liturgical";
computeEaster(2025); // → Date — Easter Sunday 2025
easterRelativeDate(2025, 49); // → Date — Pentecost (Easter + 49)Reference
Event types — easter · offset (baseEvent + offsetDays), plus every standard
event property.
Exports — liturgical() · presets (EASTER, PENTECOST, GOOD_FRIDAY…) ·
computeEaster · easterRelativeDate · daily-calendar utils (getLiturgicalDay, getSeason…).
License
MIT. This plugin requires the calendaryjs core, which is licensed
PolyForm Noncommercial — so commercial use of the combined work requires a
commercial license for the core. See Commercial licensing.
