0.1.7 • Published 4 months ago

easter-date.js v0.1.7

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Easter Date Calculation

NPM Type Definitions CodeQL npm bundle size

This project provides two algorithms for calculating the date of Easter in the Western (Catholic and Protestant) and Orthodox calendars.

Based on Gauss's Easter algorithm: https://doi.org/10.1007/s00407-004-0078-5

Installing

Install with npm

  npm install easter-date.js

or yarn:

  yarn add easter-date.js

Usage/Examples

To use the algorithms, import them into your JavaScript code:

// ES Modules
import { getWesternEaster, getOrthodoxEaster } from "easter-date.js";
// CommonJS
const { getWesternEaster, getOrthodoxEaster } = require('easter-date.js');

and pass the desired year as an argument:

getWesternEaster(2024); 
// Output: { day: 31, month: 3, year: 2024 }

getOrthodoxEaster(2024); 
// Output: { day: 5, month: 5, year: 2024 }

Run Locally

Clone the project

  git clone https://github.com/42proger/easter-date.js

Go to the project directory

  cd easter-date.js

Install dependencies

  npm install

Run a compile

  npm run build

Running Tests

To run the tests, install the required dependencies and run the following command:

  npm run test

License

MIT

0.1.7

4 months ago

0.1.6

9 months ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

1.0.1

1 year ago