0.0.21 • Published 6 months ago

easter-date v0.0.21

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Easter date

NPM Downloads NPM Version NPM License Last Commit GitHub Workflow Status

Simple library that calculates the date of Easter for a given year and other Easter days.

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'); // return 31/03/2024

Get Good Friday

Function getGoodFriday returns Good Friday date for a given year:

import { getGoodFriday } from 'easter-date';

getGoodFriday(2024).toLocaleDateString('en-US'); // return 29/03/2024

Get Easter Monday

Function getEasterMonday returns Easter Monday date for a given year:

import { getEasterMonday } from 'easter-date';

getEasterMonday(2024).toLocaleDateString('en-US'); // return 01/04/2024

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; // return Palm Sunday
holyWeek.palmSunday.date.toLocaleDateString('en-US'); // return 24/03/2024

Running Tests

npm run test

Credits

License

MIT

0.0.21

6 months ago

0.0.20

7 months ago

0.0.19

9 months ago

0.0.15

10 months ago

0.0.16

10 months ago

0.0.17

10 months ago

0.0.18

9 months ago

0.0.14

11 months ago

0.0.13

12 months ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago