Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
easter-date
Advanced tools
Simple library for calculating Easter date from a given year.
npm i easter-date
or
yarn add easter-date
Functions are expecting a year as a parameter and return a Date
object.
Function getEaster
returns Easter date for a given year:
import {getEaster} from 'easter-date';
getEaster(2024).toLocaleDateString('en-US'); // return 31/03/2024
Function getGoodFriday
returns Good Friday date for a given year:
import {getGoodFriday} from 'easter-date';
getGoodFriday(2024).toLocaleDateString('en-US'); // return 29/03/2024
Function getEasterMonday
returns Easter Monday date for a given year:
import {getEasterMonday} from 'easter-date';
getEasterMonday(2024).toLocaleDateString('en-US'); // return 01/04/2024
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
MIT
FAQs
Calculate Easter date for given year
The npm package easter-date receives a total of 0 weekly downloads. As such, easter-date popularity was classified as not popular.
We found that easter-date demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.