https://github.com/commenthol/date-easter
Calculates Easter for a given year
https://github.com/commenthol/date-easter
eastern eastern-orthodox
Last synced: 11 months ago
JSON representation
Calculates Easter for a given year
- Host: GitHub
- URL: https://github.com/commenthol/date-easter
- Owner: commenthol
- License: mit
- Created: 2015-12-01T21:41:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-03-24T08:02:26.000Z (over 2 years ago)
- Last Synced: 2025-07-06T09:40:09.940Z (12 months ago)
- Topics: eastern, eastern-orthodox
- Language: JavaScript
- Size: 45.9 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# date-easter
[](https://www.npmjs.com/package/date-easter/)
[](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 Rich Bowen
-
- [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