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
1
Versions
21
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.8 to 0.0.9

5

dist/easter-monday.js

@@ -16,3 +16,6 @@ import { getEaster } from './easter-sunday.js';

export function isEasterMonday(date) {
return date.getTime() === getEasterMonday(date.getFullYear()).getTime();
const easterMonday = getEasterMonday(date.getFullYear());
return date.getFullYear() === easterMonday.getFullYear()
&& date.getMonth() === easterMonday.getMonth()
&& date.getDate() === easterMonday.getDate();
}

2

dist/easter-sunday.d.ts

@@ -11,3 +11,3 @@ /**

*/
export declare function ieEaster(date: Date): boolean;
export declare function isEaster(date: Date): boolean;
/**

@@ -14,0 +14,0 @@ * Returns the date of Easter for a given year.

@@ -27,4 +27,7 @@ /**

*/
export function ieEaster(date) {
return date.getTime() === getEaster(date.getFullYear()).getTime();
export function isEaster(date) {
const easter = getEaster(date.getFullYear());
return date.getFullYear() === easter.getFullYear()
&& date.getMonth() === easter.getMonth()
&& date.getDate() === easter.getDate();
}

@@ -43,3 +46,3 @@ /**

export function isEasterSunday(date) {
return ieEaster(date);
return isEaster(date);
}

@@ -16,3 +16,6 @@ import { getEaster } from './easter-sunday.js';

export function isGoodFriday(date) {
return date.getTime() === getGoodFriday(date.getFullYear()).getTime();
const goodFriday = getGoodFriday(date.getFullYear());
return date.getFullYear() === goodFriday.getFullYear()
&& date.getMonth() === goodFriday.getMonth()
&& date.getDate() === goodFriday.getDate();
}

@@ -16,3 +16,6 @@ import { getEaster } from './easter-sunday.js';

export function isHolySaturday(date) {
return date.getTime() === getHolySaturday(date.getFullYear()).getTime();
const holySaturday = getHolySaturday(date.getFullYear());
return date.getFullYear() === holySaturday.getFullYear()
&& date.getMonth() === holySaturday.getMonth()
&& date.getDate() === holySaturday.getDate();
}
{
"name": "easter-date",
"version": "0.0.8",
"version": "0.0.9",
"author": "Roman Ožana <roman@ozana.cz> (https://ozana.cz)",

@@ -20,7 +20,7 @@ "repository": "OzzyCzech/easter-date",

"scripts": {
"build": "tsc",
"ava": "NODE_OPTIONS='--import=tsx/esm' ava",
"xo": "xo",
"build": "rm -rf dist && tsc",
"release": "np --no-release-draft",
"test": "xo && tsc --noEmit && NODE_OPTIONS='--import=tsx/esm' ava"
"prepare": "npm run build",
"test": "xo && tsc --noEmit && NODE_OPTIONS='--import=tsx/esm' ava",
"ava": "NODE_OPTIONS='--import=tsx/esm' ava"
},

@@ -27,0 +27,0 @@ "engines": {

@@ -70,4 +70,10 @@ # Easter date

## Credits
- [Easter dates calculation](https://github.com/paulzag/ZagZ-iCalendars) for the Easter dates
- [Svatý týden](https://cs.wikipedia.org/wiki/Svat%C3%BD_t%C3%BDden) for names of the Easter days
- [Online calendar](https://calendar.center/) for verifying the data
## 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