Calculate the date of Easter for a given year
npm install easter-date




Simple library that calculates the date of Easter for a given year and other Easter days.
``shell`
npm i easter-date
or
`shell`
yarn add easter-date
Functions are expecting a year as a parameter and return a Date object.
Function getEaster returns Easter date for a given year:
`javascript
import { getEaster } from 'easter-date';
getEaster(2024).toLocaleDateString('en-US'); // return 31/03/2024
`
Function getGoodFriday returns Good Friday date for a given year:
`javascript
import { getGoodFriday } from 'easter-date';
getGoodFriday(2024).toLocaleDateString('en-US'); // return 29/03/2024
`
Function getEasterMonday returns Easter Monday date for a given year:
`javascript
import { getEasterMonday } from 'easter-date';
getEasterMonday(2024).toLocaleDateString('en-US'); // return 01/04/2024
`
Function getHolyWeek returns an object of Holy Week dates for a given year:
`javascript
import { getHolyWeek } from 'easter-date';
const holyWeek = getHolyWeek(2024);
holyWeek.palmSunday.name; // return Palm Sunday
holyWeek.palmSunday.date.toLocaleDateString('en-US'); // return 24/03/2024
`
shell
npm run test
``- Easter dates calculation for the Easter dates
- Svatý týden for names of the Easter days
- Online calendar for verifying the data
Made with ❤️ by the Roman Ožana