https://github.com/mauriciorobayo/pascua
Calculate Easter date for any given year
https://github.com/mauriciorobayo/pascua
easter easter-date gregorian-calendar holidays
Last synced: 4 months ago
JSON representation
Calculate Easter date for any given year
- Host: GitHub
- URL: https://github.com/mauriciorobayo/pascua
- Owner: MauricioRobayo
- License: mit
- Created: 2020-07-29T11:29:48.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-16T03:24:44.000Z (10 months ago)
- Last Synced: 2025-04-08T06:44:33.149Z (6 months ago)
- Topics: easter, easter-date, gregorian-calendar, holidays
- Language: TypeScript
- Homepage:
- Size: 7.48 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pascua 🙏
[](https://badge.fury.io/js/pascua)
[](https://github.com/MauricioRobayo/pascua/actions?query=workflow%3A%22build+and+release%22)
[](https://codecov.io/gh/MauricioRobayo/pascua)
[](https://www.codefactor.io/repository/github/mauriciorobayo/pascua)Calculate Easter date for a given year, traditionally celebrated on the first Sunday after the [Paschal full moon](https://en.wikipedia.org/wiki/Ecclesiastical_full_moon), using the ["Meeus/Jones/butcher" algorithm](https://en.wikipedia.org/wiki/Computus).
## Installation
To install as a dependency:
```
npm install pascua
```## Usage
`pascua` exports a single function that takes an optional `integer` between 1583 and 4099 for the year.
```js
import pascua from "pascua";// Easter date for the current year
const easter = pascua();// Easter date for 1984
const easter1984 = pascua(1984);
```The function will return an object with the following properties:
| Property | Description |
| ------------ | --------------------------------------- |
| `year` | Year |
| `month` | Month |
| `day` | Day |
| `toString()` | Returns a formatted string `YYYY-MM-DD` |## TypeScript
The module is written in TypeScript and type definitions files are included.
## Contributing
Contributions, issues and feature requests are welcome!
## Show your support
Give a ⭐️ if you like this project!
## Acknowledgements
[date-easter](https://github.com/commenthol/date-easter/blob/master/index.js).
## License
[MIT](LICENSE)