1.1.2 • Published 6 months ago

jewish-holidays v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Jewish Holidays

An easy-to-use npm package for checking Jewish holidays and Shabbat.

To install the package, run one of the following commands:

npm i jewish-holidays

or with yarn

yarn add jewish-holidays

Usage

You can use the package in your JavaScript projects as shown below:

import { isYomTov, isShabbat } from 'jewish-holidays';

// Check if a date is Yom Tov
const date = new Date();
const isInChutzLaaretz = true; // Adjust as needed
console.log(isYomTov(date, isInChutzLaaretz)); // true or false

// Check if a date is Shabbat
console.log(isShabbat(date)); // true or false

Functions

isYomTov

isYomTov(date: Date | BasicJewishDate, isChutzLaaretz: boolean) => boolean

Determines if the given date is a Yom Tov (Jewish holiday).

  • date: A JavaScript Date object or a BasicJewishDate object.
  • isChutzLaaretz: A boolean indicating if the calculation should consider diaspora holidays.

isShabbat

isShabbat(date: Date | BasicJewishDate) => boolean

Determines if the given date is Shabbat.

  • date: A JavaScript Date object or a BasicJewishDate object.
export declare const isErevShabbat: (date: Date | BasicJewishDate) => boolean;

export declare const isErevYomTov: (date: Date | BasicJewishDate) => boolean;

export declare const isCholHaMoed: (date: Date | BasicJewishDate, isChutzLaaretz?: boolean) => boolean;

export declare const isChanukah: (date: Date | BasicJewishDate) => boolean;

License

MIT

1.1.1

6 months ago

1.1.2

6 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago