Easter date
Simple library for calculating Easter date from a given year.
Install package
npm i easter-date
or
yarn add easter-date
Functions
Functions are expecting a year as a parameter and return a Date
object.
Get Easter date
Function getEaster
returns Easter date for a given year:
import {getEaster} from 'easter-date';
getEaster(2024).toLocaleDateString('en-US');
Get Good Friday
Function getGoodFriday
returns Good Friday date for a given year:
import {getGoodFriday} from 'easter-date';
getGoodFriday(2024).toLocaleDateString('en-US');
Get Easter Monday
Function getEasterMonday
returns Easter Monday date for a given year:
import {getEasterMonday} from 'easter-date';
getEasterMonday(2024).toLocaleDateString('en-US');
Get Holy Week object
Function getHolyWeek
returns an object of Holy Week dates for a given year:
import {getHolyWeek} from 'easter-date';
const holyWeek = getHolyWeek(2024);
holyWeek.palmSunday.name;
holyWeek.palmSunday.date.toLocaleDateString('en-US');
License
MIT