easter-date
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10749
72