New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

easter-date

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easter-date

Calculate the date of Easter for a given year

  • 0.0.21
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
98
increased by75%
Maintainers
0
Weekly downloads
 
Created
Source

Easter date

NPM Downloads NPM Version NPM License Last Commit GitHub Workflow Status

Simple library that calculates the date of Easter for a given year and other Easter days.

Install package

npm i easter-date

or

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:

import { getEaster } from 'easter-date';

getEaster(2024).toLocaleDateString('en-US'); // return 31/03/2024

Get Good Friday

Function getGoodFriday returns Good Friday date for a given year:

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:

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:

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

Running Tests

npm run test

Credits

License

MIT

Keywords

FAQs

Package last updated on 20 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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