Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easter-date

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easter-date - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "easter-date",
"version": "0.0.2",
"version": "0.0.3",
"author": "Roman Ožana <roman@ozana.cz> (https://ozana.cz)",

@@ -5,0 +5,0 @@ "repository": "git@github.com:OzzyCzech/easter-date.git",

@@ -11,3 +11,3 @@ # Easter date

## Install
## Install package

@@ -18,13 +18,57 @@ ```bash

or
```bash
yarn add easter-date
```
## Functions
Functions are expecting a year as a parameter and return a `Date` object.
### Get Easter date
Function `getEaster` returns Easter date for a given year:
```javascript
import {getEaster} from 'easter-date';
getEaster(2024).toISODate(); // 2024-03-31
getEaster(2024).toLocaleDateString('en-US'); // return 31/03/2024
```
### Get Good Friday
Function `getGoodFriday` returns Good Friday date for a given year:
```javascript
import {getGoodFriday} from 'easter-date';
getGoodFriday(2024).toLocaleDateString('en-US'); // return 29/03/2024
```
### Get Easter Monday
Function `getEasterMonday` returns Easter Monday date for a given year:
```javascript
import {getEasterMonday} from 'easter-date';
getEasterMonday(2024).toLocaleDateString('en-US'); // return 01/04/2024
```
### Get Holy Week object
Function `getHolyWeek` returns an object of Holy Week dates for a given year:
```javascript
import {getHolyWeek} from 'easter-date';
const holyWeek = getHolyWeek(2024);
holyWeek.palmSunday.name; // return Palm Sunday
holyWeek.palmSunday.date.toLocaleDateString('en-US'); // return 24/03/2024
```
## License
MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc