@pacote/computus

Determine the calendar date of the Easter holiday.

Usage no npm install needed!

<script type="module">
  import pacoteComputus from 'https://cdn.skypack.dev/@pacote/computus';
</script>

README

@pacote/computus

version minified minified + gzip

Determine the calendar date of the Easter holiday.

Installation

yarn add @pacote/computus

Usage

import { gregorian, julian } from '@pacote/computus'

gregorian(2020) // .toLocaleDateString() => '4/12/2020'
julian(2020) // .toLocaleDateString() => '4/19/2020'

gregorian(year: number): Date

This function takes a year and returns a Date object with the Gregorian calendar Easter day on that year at midnight.

The function uses a version of the Meeus/Jones/Butcher algorithm published by New Scientist on 30 March 1961.

julian(year: number): Date

This function takes a year and returns a Date object with the Eastern Orthodox Easter day on that year at midnight. Please note that this date is returned for the Gregorian calendar, 13 days (as of 1900 through 2099) after the Julian date.

The function implements the Jean Meeus algorithm from his book Astronomical Algorithms (1991).

License

MIT © Luís Rodrigues.