# date-easter

> Calculates Easter for a given year

Latest version **1.0.3** (published 2024-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install date-easter
pnpm add date-easter
yarn add date-easter
bun add date-easter
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2024-03-24 |
| First published | 2015-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.0.0 |
| Dependencies | 0 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | commenthol |
| Maintainers | commenthol |
| Keywords | easter |

## Links

- npm: https://www.npmjs.com/package/date-easter
- Repository: https://github.com/commenthol/date-easter
- Homepage: https://github.com/commenthol/date-easter#readme
- Issues: https://github.com/commenthol/date-easter/issues
- npm.io page: https://npm.io/package/date-easter

## Recent versions

- 1.0.3 (latest) — 2024-03-24
- 1.0.0-0 (next) — 2021-02-13
- 1.0.2 — 2022-05-21
- 1.0.1 — 2021-05-22
- 1.0.0 — 2021-03-27
- 0.2.5 — 2019-10-09
- 0.2.4 — 2018-12-22
- 0.2.3 — 2018-09-03
- 0.2.2 — 2015-12-07
- 0.2.1 — 2015-12-06
- 0.2.0 — 2015-12-03
- 0.1.0 — 2015-12-01

## README

# date-easter

[![NPM version](https://badge.fury.io/js/date-easter.svg)](https://www.npmjs.com/package/date-easter/)
[![Build Status](https://github.com/commenthol/date-easter/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/commenthol/date-easter/actions/workflows/ci.yml?query=branch%3Amaster)

> Calculates Easter for a given year

## Synopsis

````js
// ES5
import {easter, gregorianEaster, julianEaster, orthodoxEaster} from 'date-easter'
// cjs
const {easter, gregorianEaster, julianEaster, orthodoxEaster} = require('date-easter')

easter(2016)
// { year: 2016, month: 3, day: 27 }
gregorianEaster(new Date('2016-01-01'))
// { year: 2016, month: 3, day: 27 }
julianEaster(2016)
// { year: 2016, month: 4, day: 18 }
orthodoxEaster(2016)
// { year: 2016, month: 5, day: 1 }
````

## Description

All methods return an object with the following properties
- **year**: Year (begins at 0)
- **month**: Month (1 ... 12)
- **day**: Day (1 ... 31)  
- **toString()**: Returns a formatted String `YYYY-MM-DD`

### easter

Shortcut for `gregorianEaster`.

### gregorianEaster

Returns the date of Gregorian Easter for a given year. Uses the extended [Gaussian Easter algorithm][].

### julianEaster

Returns the date of Julian Easter for a given year in the Julian Calender

### orthodoxEaster

Returns the date of Julian Easter for a given year in the Gregorian Calender

## References

- Date::Easter Perl Package <https://metacpan.org/pod/Date::Easter> Rich Bowen <rbowen@rcbowen.com>
- <http://www.chariot.net.au/~gmarts/eastcalc.htm>
- [Gaussian Easter algorithm][]

## License

Copyright (c) 2015 commenthol

Software is released under [MIT][license].

[license]: ./LICENSE
[Gaussian Easter algorithm]: https://de.wikipedia.org/wiki/Gau%C3%9Fsche_Osterformel#Eine_erg.C3.A4nzte_Osterformel

---
_Source: https://npm.io/package/date-easter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
