@hebcal/core 6.15.0 → 6.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +106 -54
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +5 -5
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.d.ts +1 -1
- package/dist/esm/HolidayEvent.js +3 -3
- package/dist/esm/HolidayEvent.js.map +1 -1
- package/dist/esm/KiddushLevanaEvent.js +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +2 -2
- package/dist/esm/ParshaEvent.js.map +1 -1
- package/dist/esm/TimedEvent.js +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.js +1 -1
- package/dist/esm/calendar.js +1 -1
- package/dist/esm/candles.js +1 -1
- package/dist/esm/cities.json.js +1 -1
- package/dist/esm/event.js +1 -1
- package/dist/esm/getStartAndEnd.js +1 -1
- package/dist/esm/hallel.d.ts +26 -3
- package/dist/esm/hallel.js +86 -29
- package/dist/esm/hallel.js.map +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.d.ts +3 -9
- package/dist/esm/hebcal.js +6 -16
- package/dist/esm/hebcal.js.map +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/horizon.js +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isAssurBemlacha.js +1 -1
- package/dist/esm/isAveilut.js +1 -1
- package/dist/esm/isFastDay.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/omer.d.ts +4 -0
- package/dist/esm/omer.js +6 -2
- package/dist/esm/omer.js.map +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.js +1 -1
- package/dist/esm/pkgVersion.d.ts +1 -1
- package/dist/esm/pkgVersion.js +2 -2
- package/dist/esm/pkgVersion.js.map +1 -1
- package/dist/esm/reformatTimeStr.js +1 -1
- package/dist/esm/sedra.js +1 -1
- package/dist/esm/sefira.json.js +1 -1
- package/dist/esm/staticHolidays.js +1 -1
- package/dist/esm/string.js +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/zenith.js +1 -1
- package/dist/esm/zmanim.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
const cals = new Map();
|
|
3
3
|
/**
|
|
4
4
|
* Plug-in registry for daily learning calendars such as Daf Yomi (Bavli),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { Locale, gematriya, months } from '@hebcal/hdate';
|
|
3
3
|
import { Event, flags } from './event.js';
|
|
4
4
|
import './locale.js';
|
|
@@ -44,7 +44,7 @@ export declare class HolidayEvent extends Event {
|
|
|
44
44
|
/**
|
|
45
45
|
* Returns a `https://www.hebcal.com/holidays/...` URL for more detail on
|
|
46
46
|
* this holiday. Israel-only holidays get an `?i=on` query parameter.
|
|
47
|
-
* Returns `undefined` for years outside `[
|
|
47
|
+
* Returns `undefined` for Gregorian years outside `[1752, 2499]` and for
|
|
48
48
|
* Ta'anit BeHaB, which has no holiday page.
|
|
49
49
|
*/
|
|
50
50
|
url(): string | undefined;
|
package/dist/esm/HolidayEvent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { isoDateString, Locale } from '@hebcal/hdate';
|
|
3
3
|
import { Event, flags } from './event.js';
|
|
4
4
|
import { holidayDesc } from './staticHolidays.js';
|
|
@@ -63,7 +63,7 @@ class HolidayEvent extends Event {
|
|
|
63
63
|
/**
|
|
64
64
|
* Returns a `https://www.hebcal.com/holidays/...` URL for more detail on
|
|
65
65
|
* this holiday. Israel-only holidays get an `?i=on` query parameter.
|
|
66
|
-
* Returns `undefined` for years outside `[
|
|
66
|
+
* Returns `undefined` for Gregorian years outside `[1752, 2499]` and for
|
|
67
67
|
* Ta'anit BeHaB, which has no holiday page.
|
|
68
68
|
*/
|
|
69
69
|
url() {
|
|
@@ -71,7 +71,7 @@ class HolidayEvent extends Event {
|
|
|
71
71
|
return undefined;
|
|
72
72
|
}
|
|
73
73
|
const year = this.greg().getFullYear();
|
|
74
|
-
if (year <
|
|
74
|
+
if (year < 1752 || year > 2499) {
|
|
75
75
|
return undefined;
|
|
76
76
|
}
|
|
77
77
|
const url = `https://www.hebcal.com/holidays/${urlFriendly(this.basename())}-${this.urlDateSuffix()}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HolidayEvent.js","sources":["../../../src/HolidayEvent.ts"],"sourcesContent":["import {HDate, Locale, isoDateString} from '@hebcal/hdate';\nimport {Event, flags} from './event.js';\nimport {holidayDesc as hdesc} from './staticHolidays.js';\nimport {smartApostrophe, urlFriendly} from './string.js';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\n\n/**\n * Represents a built-in holiday like Pesach, Purim or Tu BiShvat.\n *\n * Most holiday-related events emitted by {@link calendar}\n * are instances of `HolidayEvent` or one of its subclasses\n * ({@link ChanukahEvent}, {@link AsaraBTevetEvent},\n * {@link RoshHashanaEvent}, {@link RoshChodeshEvent}).\n *\n * Adds two notable behaviors over the base {@link Event}:\n *\n * - {@link HolidayEvent.basename} strips qualifiers like `Erev `, ` I`/`II`,\n * `(CH''M)`, `(observed)`, candle counts, etc. (e.g. `\"Erev Pesach\"` →\n * `\"Pesach\"`).\n * - {@link HolidayEvent.url} returns a `https://www.hebcal.com/holidays/...`\n * link for the holiday.\n */\nexport class HolidayEvent extends Event {\n /** During Sukkot or Pesach */\n readonly cholHaMoedDay?: number;\n /**\n * `true` if the fast day was postponed a day to avoid Shabbat.\n * - Tish'a B'Av postponed from the 9th to the 10th\n * - Tzom Tammuz postponed from the 17th to the 18th\n */\n readonly observed?: boolean;\n constructor(date: HDate, desc: string, mask = 0, attrs?: object) {\n super(date, desc, mask, attrs);\n if (typeof attrs === 'object' && attrs !== null) {\n Object.assign(this, attrs);\n }\n }\n\n /**\n * Returns a simplified (untranslated) name for this holiday, stripping\n * qualifiers so that related events group under one name.\n *\n * Strips trailing 4-digit years, `(CH''M)`, `(observed)`, `(Hoshana Raba)`,\n * Roman-numeral day numbers (` I`, ` II`, ...), Chanukah candle counts,\n * `: 8th Day`, and a leading `\"Erev \"`.\n * @example\n * // 'Erev Pesach' => 'Pesach'\n * // 'Sukkot III (CH''M)' => 'Sukkot'\n * // 'Chanukah: 5 Candles' => 'Chanukah'\n * // 'Rosh Hashana 5784' => 'Rosh Hashana'\n */\n override basename(): string {\n return this.getDesc()\n .replace(/ \\d{4}$/, '')\n .replace(/ \\(CH''M\\)$/, '')\n .replace(/ \\(observed\\)$/, '')\n .replace(/ \\(Hoshana Raba\\)$/, '')\n .replace(/ [IV]+$/, '')\n .replace(/: \\d Candles?$/, '')\n .replace(/: 8th Day$/, '')\n .replace(/^Erev /, '');\n }\n\n /**\n * Returns a `https://www.hebcal.com/holidays/...` URL for more detail on\n * this holiday. Israel-only holidays get an `?i=on` query parameter.\n * Returns `undefined` for years outside `[100, 2999]` and for\n * Ta'anit BeHaB, which has no holiday page.\n */\n override url(): string | undefined {\n if (this.hasFlag('BEHAB')) {\n return undefined;\n }\n const year = this.greg().getFullYear();\n if (year < 100 || year > 2999) {\n return undefined;\n }\n const url = `https://www.hebcal.com/holidays/${urlFriendly(this.basename())}-${this.urlDateSuffix()}`;\n return this.hasFlag('IL_ONLY') ? `${url}?i=on` : url;\n }\n\n /**\n * The date portion of {@link url}. For most holidays this is just the\n * Gregorian year; subclasses override it when a year alone is ambiguous.\n */\n urlDateSuffix(): string {\n return String(this.greg().getFullYear());\n }\n\n override getEmoji(): string {\n if (this.emoji) {\n return this.emoji;\n }\n if (this.hasFlag('SPECIAL_SHABBAT')) {\n return '🕍';\n }\n return '✡️';\n }\n\n override getCategories(): string[] {\n if (this.cholHaMoedDay) {\n return ['holiday', 'major', 'cholhamoed'];\n }\n const cats = super.getCategories();\n if (cats[0] !== 'unknown') {\n return cats;\n }\n // Don't depend on flags.MINOR_HOLIDAY always being set. Look for minor holidays.\n const desc = this.getDesc();\n switch (desc) {\n case hdesc.LAG_BAOMER:\n case hdesc.LEIL_SELICHOT:\n case hdesc.PESACH_SHENI:\n case hdesc.EREV_PURIM:\n case hdesc.PURIM_KATAN:\n case hdesc.SHUSHAN_PURIM:\n case hdesc.TU_BAV:\n case hdesc.TU_BISHVAT:\n case hdesc.ROSH_HASHANA_LABEHEMOT:\n return ['holiday', 'minor'];\n }\n\n return ['holiday', 'major'];\n }\n /**\n * Returns (translated) description of this event\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n const str = super.render(locale);\n return smartApostrophe(str);\n }\n /**\n * Returns a brief (translated) description of this event.\n * For most events, this is the same as render(). For some events, it procudes\n * a shorter text (e.g. without a time or added description).\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override renderBrief(locale?: string): string {\n const str = super.renderBrief(locale);\n return smartApostrophe(str);\n }\n}\n\n/**\n * Because Asara B'Tevet often occurs twice in the same Gregorian year,\n * we subclass HolidayEvent to generate the correct URL.\n */\nexport class AsaraBTevetEvent extends HolidayEvent {\n /** Full `YYYYMMDD` date, since the Gregorian year alone is ambiguous here */\n override urlDateSuffix(): string {\n const isoDate = isoDateString(this.greg());\n return isoDate.replaceAll('-', '');\n }\n}\n\nconst chanukahEmoji = '🕎';\nconst KEYCAP_DIGITS = [\n '0️⃣',\n '1️⃣',\n '2️⃣',\n '3️⃣',\n '4️⃣',\n '5️⃣',\n '6️⃣',\n '7️⃣',\n '8️⃣',\n '9️⃣',\n] as const;\n\n/**\n * Because Chanukah sometimes starts in December and ends in January,\n * we subclass HolidayEvent to generate the correct URL.\n */\nexport class ChanukahEvent extends HolidayEvent {\n readonly chanukahDay?: number;\n /**\n * @param chanukahDay should be undefined for 1st night of Chanukah\n */\n constructor(date: HDate, desc: string, mask: number, chanukahDay?: number) {\n super(date, desc, mask);\n this.chanukahDay = chanukahDay;\n this.emoji = chanukahEmoji;\n if (chanukahDay !== 8) {\n const candles = chanukahDay ? chanukahDay + 1 : 1;\n this.emoji += KEYCAP_DIGITS[candles];\n }\n }\n override urlDateSuffix(): string {\n const dt = this.greg();\n let year = dt.getFullYear();\n if (dt.getMonth() === 0) {\n year--;\n }\n return String(year);\n }\n}\n\n/** Represents Rosh Hashana, the Jewish New Year */\nexport class RoshHashanaEvent extends HolidayEvent {\n private readonly hyear: number;\n /**\n * Normally created by {@link calendar} rather than directly.\n * @param date Hebrew date event occurs\n * @param hyear Hebrew year\n * @param mask optional holiday flags\n */\n constructor(date: HDate, hyear: number, mask: number) {\n super(date, `Rosh Hashana ${hyear}`, mask);\n this.hyear = hyear;\n }\n /**\n * Returns (translated) description of this event\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n return `${Locale.gettext('Rosh Hashana', locale)} ${this.hyear}`;\n }\n\n override getEmoji(): string {\n return '🍏🍯';\n }\n}\n\nconst roshChodeshStr = 'Rosh Chodesh';\n\n/** Represents Rosh Chodesh, the beginning of a new month */\nexport class RoshChodeshEvent extends HolidayEvent {\n /**\n * Constructs Rosh Chodesh event\n * @param date Hebrew date event occurs\n * @param monthName Hebrew month name (not translated)\n */\n constructor(date: HDate, monthName: string) {\n super(date, `${roshChodeshStr} ${monthName}`, flags.ROSH_CHODESH);\n }\n /**\n * Returns (translated) description of this event\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n const monthName = this.getDesc().substring(roshChodeshStr.length + 1);\n const monthName0 = Locale.gettext(monthName, locale);\n const monthName1 = smartApostrophe(monthName0);\n return `${Locale.gettext(roshChodeshStr, locale)} ${monthName1}`;\n }\n\n override basename(): string {\n return this.getDesc();\n }\n\n override getEmoji(): string {\n return this.emoji || '🌒';\n }\n}\n"],"names":["hdesc"],"mappings":";;;;;;;AAMA;;;;;;;;;;;;;;;AAeG;AACG,MAAO,YAAa,SAAQ,KAAK,CAAA;;AAE5B,IAAA,aAAa;AACtB;;;;AAIG;AACM,IAAA,QAAQ;IACjB,WAAA,CAAY,IAAW,EAAE,IAAY,EAAE,IAAI,GAAG,CAAC,EAAE,KAAc,EAAA;QAC7D,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC;QAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;AAC/C,YAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC;QAC5B;IACF;AAEA;;;;;;;;;;;;AAYG;IACM,QAAQ,GAAA;QACf,OAAO,IAAI,CAAC,OAAO;AAChB,aAAA,OAAO,CAAC,SAAS,EAAE,EAAE;AACrB,aAAA,OAAO,CAAC,aAAa,EAAE,EAAE;AACzB,aAAA,OAAO,CAAC,gBAAgB,EAAE,EAAE;AAC5B,aAAA,OAAO,CAAC,oBAAoB,EAAE,EAAE;AAChC,aAAA,OAAO,CAAC,SAAS,EAAE,EAAE;AACrB,aAAA,OAAO,CAAC,gBAAgB,EAAE,EAAE;AAC5B,aAAA,OAAO,CAAC,YAAY,EAAE,EAAE;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,IAAW,EAAE,SAAiB,EAAA;AACxC,QAAA,KAAK,CAAC,IAAI,EAAE,CAAA,EAAG,cAAc,CAAA,CAAA,EAAI,SAAS,CAAA,CAAE,EAAE,KAAK,CAAC,YAAY,CAAC;IACnE;AACA;;;AAGG;AACM,IAAA,MAAM,CAAC,MAAe,EAAA;AAC7B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QACrE,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC;AACpD,QAAA,MAAM,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;AAC9C,QAAA,OAAO,CAAA,EAAG,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA,CAAA,EAAI,UAAU,CAAA,CAAE;IAClE;IAES,QAAQ,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE;IACvB;IAES,QAAQ,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI;IAC3B;AACD;;"}
|
|
1
|
+
{"version":3,"file":"HolidayEvent.js","sources":["../../../src/HolidayEvent.ts"],"sourcesContent":["import {HDate, Locale, isoDateString} from '@hebcal/hdate';\nimport {Event, flags} from './event.js';\nimport {holidayDesc as hdesc} from './staticHolidays.js';\nimport {smartApostrophe, urlFriendly} from './string.js';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\n\n/**\n * Represents a built-in holiday like Pesach, Purim or Tu BiShvat.\n *\n * Most holiday-related events emitted by {@link calendar}\n * are instances of `HolidayEvent` or one of its subclasses\n * ({@link ChanukahEvent}, {@link AsaraBTevetEvent},\n * {@link RoshHashanaEvent}, {@link RoshChodeshEvent}).\n *\n * Adds two notable behaviors over the base {@link Event}:\n *\n * - {@link HolidayEvent.basename} strips qualifiers like `Erev `, ` I`/`II`,\n * `(CH''M)`, `(observed)`, candle counts, etc. (e.g. `\"Erev Pesach\"` →\n * `\"Pesach\"`).\n * - {@link HolidayEvent.url} returns a `https://www.hebcal.com/holidays/...`\n * link for the holiday.\n */\nexport class HolidayEvent extends Event {\n /** During Sukkot or Pesach */\n readonly cholHaMoedDay?: number;\n /**\n * `true` if the fast day was postponed a day to avoid Shabbat.\n * - Tish'a B'Av postponed from the 9th to the 10th\n * - Tzom Tammuz postponed from the 17th to the 18th\n */\n readonly observed?: boolean;\n constructor(date: HDate, desc: string, mask = 0, attrs?: object) {\n super(date, desc, mask, attrs);\n if (typeof attrs === 'object' && attrs !== null) {\n Object.assign(this, attrs);\n }\n }\n\n /**\n * Returns a simplified (untranslated) name for this holiday, stripping\n * qualifiers so that related events group under one name.\n *\n * Strips trailing 4-digit years, `(CH''M)`, `(observed)`, `(Hoshana Raba)`,\n * Roman-numeral day numbers (` I`, ` II`, ...), Chanukah candle counts,\n * `: 8th Day`, and a leading `\"Erev \"`.\n * @example\n * // 'Erev Pesach' => 'Pesach'\n * // 'Sukkot III (CH''M)' => 'Sukkot'\n * // 'Chanukah: 5 Candles' => 'Chanukah'\n * // 'Rosh Hashana 5784' => 'Rosh Hashana'\n */\n override basename(): string {\n return this.getDesc()\n .replace(/ \\d{4}$/, '')\n .replace(/ \\(CH''M\\)$/, '')\n .replace(/ \\(observed\\)$/, '')\n .replace(/ \\(Hoshana Raba\\)$/, '')\n .replace(/ [IV]+$/, '')\n .replace(/: \\d Candles?$/, '')\n .replace(/: 8th Day$/, '')\n .replace(/^Erev /, '');\n }\n\n /**\n * Returns a `https://www.hebcal.com/holidays/...` URL for more detail on\n * this holiday. Israel-only holidays get an `?i=on` query parameter.\n * Returns `undefined` for Gregorian years outside `[1752, 2499]` and for\n * Ta'anit BeHaB, which has no holiday page.\n */\n override url(): string | undefined {\n if (this.hasFlag('BEHAB')) {\n return undefined;\n }\n const year = this.greg().getFullYear();\n if (year < 1752 || year > 2499) {\n return undefined;\n }\n const url = `https://www.hebcal.com/holidays/${urlFriendly(this.basename())}-${this.urlDateSuffix()}`;\n return this.hasFlag('IL_ONLY') ? `${url}?i=on` : url;\n }\n\n /**\n * The date portion of {@link url}. For most holidays this is just the\n * Gregorian year; subclasses override it when a year alone is ambiguous.\n */\n urlDateSuffix(): string {\n return String(this.greg().getFullYear());\n }\n\n override getEmoji(): string {\n if (this.emoji) {\n return this.emoji;\n }\n if (this.hasFlag('SPECIAL_SHABBAT')) {\n return '🕍';\n }\n return '✡️';\n }\n\n override getCategories(): string[] {\n if (this.cholHaMoedDay) {\n return ['holiday', 'major', 'cholhamoed'];\n }\n const cats = super.getCategories();\n if (cats[0] !== 'unknown') {\n return cats;\n }\n // Don't depend on flags.MINOR_HOLIDAY always being set. Look for minor holidays.\n const desc = this.getDesc();\n switch (desc) {\n case hdesc.LAG_BAOMER:\n case hdesc.LEIL_SELICHOT:\n case hdesc.PESACH_SHENI:\n case hdesc.EREV_PURIM:\n case hdesc.PURIM_KATAN:\n case hdesc.SHUSHAN_PURIM:\n case hdesc.TU_BAV:\n case hdesc.TU_BISHVAT:\n case hdesc.ROSH_HASHANA_LABEHEMOT:\n return ['holiday', 'minor'];\n }\n\n return ['holiday', 'major'];\n }\n /**\n * Returns (translated) description of this event\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n const str = super.render(locale);\n return smartApostrophe(str);\n }\n /**\n * Returns a brief (translated) description of this event.\n * For most events, this is the same as render(). For some events, it procudes\n * a shorter text (e.g. without a time or added description).\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override renderBrief(locale?: string): string {\n const str = super.renderBrief(locale);\n return smartApostrophe(str);\n }\n}\n\n/**\n * Because Asara B'Tevet often occurs twice in the same Gregorian year,\n * we subclass HolidayEvent to generate the correct URL.\n */\nexport class AsaraBTevetEvent extends HolidayEvent {\n /** Full `YYYYMMDD` date, since the Gregorian year alone is ambiguous here */\n override urlDateSuffix(): string {\n const isoDate = isoDateString(this.greg());\n return isoDate.replaceAll('-', '');\n }\n}\n\nconst chanukahEmoji = '🕎';\nconst KEYCAP_DIGITS = [\n '0️⃣',\n '1️⃣',\n '2️⃣',\n '3️⃣',\n '4️⃣',\n '5️⃣',\n '6️⃣',\n '7️⃣',\n '8️⃣',\n '9️⃣',\n] as const;\n\n/**\n * Because Chanukah sometimes starts in December and ends in January,\n * we subclass HolidayEvent to generate the correct URL.\n */\nexport class ChanukahEvent extends HolidayEvent {\n readonly chanukahDay?: number;\n /**\n * @param chanukahDay should be undefined for 1st night of Chanukah\n */\n constructor(date: HDate, desc: string, mask: number, chanukahDay?: number) {\n super(date, desc, mask);\n this.chanukahDay = chanukahDay;\n this.emoji = chanukahEmoji;\n if (chanukahDay !== 8) {\n const candles = chanukahDay ? chanukahDay + 1 : 1;\n this.emoji += KEYCAP_DIGITS[candles];\n }\n }\n override urlDateSuffix(): string {\n const dt = this.greg();\n let year = dt.getFullYear();\n if (dt.getMonth() === 0) {\n year--;\n }\n return String(year);\n }\n}\n\n/** Represents Rosh Hashana, the Jewish New Year */\nexport class RoshHashanaEvent extends HolidayEvent {\n private readonly hyear: number;\n /**\n * Normally created by {@link calendar} rather than directly.\n * @param date Hebrew date event occurs\n * @param hyear Hebrew year\n * @param mask optional holiday flags\n */\n constructor(date: HDate, hyear: number, mask: number) {\n super(date, `Rosh Hashana ${hyear}`, mask);\n this.hyear = hyear;\n }\n /**\n * Returns (translated) description of this event\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n return `${Locale.gettext('Rosh Hashana', locale)} ${this.hyear}`;\n }\n\n override getEmoji(): string {\n return '🍏🍯';\n }\n}\n\nconst roshChodeshStr = 'Rosh Chodesh';\n\n/** Represents Rosh Chodesh, the beginning of a new month */\nexport class RoshChodeshEvent extends HolidayEvent {\n /**\n * Constructs Rosh Chodesh event\n * @param date Hebrew date event occurs\n * @param monthName Hebrew month name (not translated)\n */\n constructor(date: HDate, monthName: string) {\n super(date, `${roshChodeshStr} ${monthName}`, flags.ROSH_CHODESH);\n }\n /**\n * Returns (translated) description of this event\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n const monthName = this.getDesc().substring(roshChodeshStr.length + 1);\n const monthName0 = Locale.gettext(monthName, locale);\n const monthName1 = smartApostrophe(monthName0);\n return `${Locale.gettext(roshChodeshStr, locale)} ${monthName1}`;\n }\n\n override basename(): string {\n return this.getDesc();\n }\n\n override getEmoji(): string {\n return this.emoji || '🌒';\n }\n}\n"],"names":["hdesc"],"mappings":";;;;;;;AAMA;;;;;;;;;;;;;;;AAeG;AACG,MAAO,YAAa,SAAQ,KAAK,CAAA;;AAE5B,IAAA,aAAa;AACtB;;;;AAIG;AACM,IAAA,QAAQ;IACjB,WAAA,CAAY,IAAW,EAAE,IAAY,EAAE,IAAI,GAAG,CAAC,EAAE,KAAc,EAAA;QAC7D,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC;QAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;AAC/C,YAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC;QAC5B;IACF;AAEA;;;;;;;;;;;;AAYG;IACM,QAAQ,GAAA;QACf,OAAO,IAAI,CAAC,OAAO;AAChB,aAAA,OAAO,CAAC,SAAS,EAAE,EAAE;AACrB,aAAA,OAAO,CAAC,aAAa,EAAE,EAAE;AACzB,aAAA,OAAO,CAAC,gBAAgB,EAAE,EAAE;AAC5B,aAAA,OAAO,CAAC,oBAAoB,EAAE,EAAE;AAChC,aAAA,OAAO,CAAC,SAAS,EAAE,EAAE;AACrB,aAAA,OAAO,CAAC,gBAAgB,EAAE,EAAE;AAC5B,aAAA,OAAO,CAAC,YAAY,EAAE,EAAE;AACxB,aAAA,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC1B;AAEA;;;;;AAKG;IACM,GAAG,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,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AC;IACnE;AACA;;;AAGG;AACM,IAAA,MAAM,CAAC,MAAe,EAAA;AAC7B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QACrE,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC;AACpD,QAAA,MAAM,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;AAC9C,QAAA,OAAO,CAAA,EAAG,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA,CAAA,EAAI,UAAU,CAAA,CAAE;IAClE;IAES,QAAQ,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE;IACvB;IAES,QAAQ,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI;IAC3B;AACD;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import 'temporal-polyfill/global';
|
|
3
3
|
import { HDate } from '@hebcal/hdate';
|
|
4
4
|
import { flags } from './event.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { Locale, HDate, months } from '@hebcal/hdate';
|
|
3
3
|
import { Event, flags } from './event.js';
|
|
4
4
|
import { Molad } from './molad.js';
|
package/dist/esm/ParshaEvent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { Event, flags } from './event.js';
|
|
3
3
|
import { HDate, isoDateString } from '@hebcal/hdate';
|
|
4
4
|
import { renderParshaName } from './parshaName.js';
|
|
@@ -53,7 +53,7 @@ class ParshaEvent extends Event {
|
|
|
53
53
|
}
|
|
54
54
|
url() {
|
|
55
55
|
const year = this.greg().getFullYear();
|
|
56
|
-
if (year <
|
|
56
|
+
if (year < 1752 || year > 2499) {
|
|
57
57
|
return undefined;
|
|
58
58
|
}
|
|
59
59
|
const dt = this.urlDateSuffix();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParshaEvent.js","sources":["../../../src/ParshaEvent.ts"],"sourcesContent":["import {Event, flags} from './event.js';\nimport {HDate, isoDateString} from '@hebcal/hdate';\nimport {renderParshaName} from './parshaName.js';\nimport {urlFriendly} from './string.js';\nimport {SedraResult} from './sedra.js';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\n\n/**\n * Represents one of 54 weekly Torah portions, always on a Saturday.\n *\n * `ParshaEvent` is for regular Parashat HaShavua readings. For Shabbatot\n * with holiday readings such as Shabbat Chol ha-Moed, use\n * `getHolidaysOnDate()` from `@hebcal/core`, or `getLeyningOnDate()` from\n * `@hebcal/leyning` when the display title and exact Torah readings are needed.\n */\nexport class ParshaEvent extends Event {\n /** The parsha name(s) and date this event was constructed from */\n readonly p: SedraResult;\n /**\n * Normally created by {@link calendar} (via `options.sedrot`)\n * rather than directly.\n * @param parsha result from {@link Sedra.lookup}\n * @throws {TypeError} if called with anything other than exactly one argument\n * @throws {TypeError} if `parsha` is not a valid {@link SedraResult} — it must\n * have an `HDate` and one or two parsha names\n */\n constructor(parsha: SedraResult) {\n // eslint-disable-next-line prefer-rest-params\n if (arguments.length !== 1) {\n throw new TypeError(\n `ParshaEvent constructor takes a single SedraResult argument; ` +\n `got ${arguments.length} arguments`\n );\n }\n if (\n typeof parsha !== 'object' ||\n parsha === null ||\n !Array.isArray(parsha.parsha) ||\n parsha.parsha.length === 0 ||\n parsha.parsha.length > 2 ||\n !HDate.isHDate(parsha.hdate)\n ) {\n throw new TypeError(\n `Invalid SedraResult argument: ${JSON.stringify(parsha)}`\n );\n }\n const desc = `Parashat ${parsha.parsha.join('-')}`;\n super(parsha.hdate, desc, flags.PARSHA_HASHAVUA);\n this.p = parsha;\n }\n /**\n * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to empty locale.\n */\n override render(locale?: string): string {\n return renderParshaName(this.p.parsha, locale);\n }\n\n override basename(): string {\n return this.p.parsha.join('-');\n }\n\n override url(): string | undefined {\n const year = this.greg().getFullYear();\n if (year <
|
|
1
|
+
{"version":3,"file":"ParshaEvent.js","sources":["../../../src/ParshaEvent.ts"],"sourcesContent":["import {Event, flags} from './event.js';\nimport {HDate, isoDateString} from '@hebcal/hdate';\nimport {renderParshaName} from './parshaName.js';\nimport {urlFriendly} from './string.js';\nimport {SedraResult} from './sedra.js';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\n\n/**\n * Represents one of 54 weekly Torah portions, always on a Saturday.\n *\n * `ParshaEvent` is for regular Parashat HaShavua readings. For Shabbatot\n * with holiday readings such as Shabbat Chol ha-Moed, use\n * `getHolidaysOnDate()` from `@hebcal/core`, or `getLeyningOnDate()` from\n * `@hebcal/leyning` when the display title and exact Torah readings are needed.\n */\nexport class ParshaEvent extends Event {\n /** The parsha name(s) and date this event was constructed from */\n readonly p: SedraResult;\n /**\n * Normally created by {@link calendar} (via `options.sedrot`)\n * rather than directly.\n * @param parsha result from {@link Sedra.lookup}\n * @throws {TypeError} if called with anything other than exactly one argument\n * @throws {TypeError} if `parsha` is not a valid {@link SedraResult} — it must\n * have an `HDate` and one or two parsha names\n */\n constructor(parsha: SedraResult) {\n // eslint-disable-next-line prefer-rest-params\n if (arguments.length !== 1) {\n throw new TypeError(\n `ParshaEvent constructor takes a single SedraResult argument; ` +\n `got ${arguments.length} arguments`\n );\n }\n if (\n typeof parsha !== 'object' ||\n parsha === null ||\n !Array.isArray(parsha.parsha) ||\n parsha.parsha.length === 0 ||\n parsha.parsha.length > 2 ||\n !HDate.isHDate(parsha.hdate)\n ) {\n throw new TypeError(\n `Invalid SedraResult argument: ${JSON.stringify(parsha)}`\n );\n }\n const desc = `Parashat ${parsha.parsha.join('-')}`;\n super(parsha.hdate, desc, flags.PARSHA_HASHAVUA);\n this.p = parsha;\n }\n /**\n * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to empty locale.\n */\n override render(locale?: string): string {\n return renderParshaName(this.p.parsha, locale);\n }\n\n override basename(): string {\n return this.p.parsha.join('-');\n }\n\n override url(): string | undefined {\n const year = this.greg().getFullYear();\n if (year < 1752 || year > 2499) {\n return undefined;\n }\n const dt = this.urlDateSuffix();\n const url = `https://www.hebcal.com/sedrot/${urlFriendly(this.basename())}-${dt}`;\n return this.p.il ? `${url}?i=on` : url;\n }\n\n /**\n * The date portion of {@link url}, as `YYYYMMDD` — a parsha name recurs every\n * year, so the full date is needed to identify the reading.\n */\n urlDateSuffix(): string {\n const isoDate = isoDateString(this.greg());\n return isoDate.replaceAll('-', '');\n }\n\n /** convenience function for compatibility with previous implementation */\n get parsha(): string[] {\n return this.p.parsha;\n }\n}\n"],"names":[],"mappings":";;;;;;;AAOA;;;;;;;AAOG;AACG,MAAO,WAAY,SAAQ,KAAK,CAAA;;AAE3B,IAAA,CAAC;AACV;;;;;;;AAOG;AACH,IAAA,WAAA,CAAY,MAAmB,EAAA;;AAE7B,QAAA,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,MAAM,IAAI,SAAS,CACjB,CAAA,6DAAA,CAA+D;AAC7D,gBAAA,CAAA,IAAA,EAAO,SAAS,CAAC,MAAM,CAAA,UAAA,CAAY,CACtC;QACH;QACA,IACE,OAAO,MAAM,KAAK,QAAQ;AAC1B,YAAA,MAAM,KAAK,IAAI;AACf,YAAA,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;AAC7B,YAAA,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;AAC1B,YA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AE,CAAC;QAC1C,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC;IACpC;;AAGA,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,CAAC,CAAC,MAAM;IACtB;AACD;;"}
|
package/dist/esm/TimedEvent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { Locale } from '@hebcal/hdate';
|
|
3
3
|
import { Event } from './event.js';
|
|
4
4
|
import { reformatTimeStr } from './reformatTimeStr.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { Locale } from '@hebcal/hdate';
|
|
3
3
|
import { flags } from './event.js';
|
|
4
4
|
import { HolidayEvent } from './HolidayEvent.js';
|
package/dist/esm/ashkenazi.po.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
var poAshkenazi = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "und-x-ashkenaz" }, "contexts": { "": { "Shabbat": ["Shabbos"], "Achrei Mot": ["Achrei Mos"], "Bechukotai": ["Bechukosai"], "Beha'alotcha": ["Beha’aloscha"], "Bereshit": ["Bereshis"], "Chukat": ["Chukas"], "Erev Shavuot": ["Erev Shavuos"], "Erev Sukkot": ["Erev Sukkos"], "Ki Tavo": ["Ki Savo"], "Ki Teitzei": ["Ki Seitzei"], "Ki Tisa": ["Ki Sisa"], "Matot": ["Matos"], "Pesach Shabbat Chol ha-Moed": ["Pesach Shabbos Chol ha-Moed"], "Purim Katan": ["Purim Koton"], "Rosh Hashana LaBehemot": ["Rosh Hashana LaBeheimos"], "Shabbat Chazon": ["Shabbos Chazon"], "Shabbat HaChodesh": ["Shabbos HaChodesh"], "Shabbat HaGadol": ["Shabbos HaGadol"], "Shabbat Nachamu": ["Shabbos Nachamu"], "Shabbat Parah": ["Shabbos Parah"], "Shabbat Shekalim": ["Shabbos Shekalim"], "Shabbat Shuva": ["Shabbos Shuvah"], "Shabbat Zachor": ["Shabbos Zachor"], "Shavuot": ["Shavuos"], "Shavuot I": ["Shavuos I"], "Shavuot II": ["Shavuos II"], "Shemot": ["Shemos"], "Shmini Atzeret": ["Shmini Atzeres"], "Simchat Torah": ["Simchas Torah"], "Sukkot": ["Sukkos"], "Sukkot I": ["Sukkos I"], "Sukkot II": ["Sukkos II"], "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"], "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"], "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"], "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"], "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"], "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"], "Sukkot Shabbat Chol ha-Moed": ["Sukkos Shabbos Chol ha-Moed"], "Ta'anit Bechorot": ["Ta’anis Bechoros"], "Ta'anit BeHaB": ["Ta’anis BeHaB"], "Ta'anit Esther": ["Ta’anis Esther"], "Toldot": ["Toldos"], "Vaetchanan": ["Vaeschanan"], "Yitro": ["Yisro"], "Vezot Haberakhah": ["Vezos Haberakhah"], "Parashat": ["Parshas"], "Leil Selichot": ["Leil Selichos"], "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"], "Shabbat Shirah": ["Shabbos Shirah"], "Asara B'Tevet": ["Asara B’Teves"], "Birkat Hachamah": ["Birkas HaChamah"], "Birkat HaChamah": ["Birkas HaChamah"], "Shushan Purim Katan": ["Shushan Purim Koton"], "Alot HaShachar": ["Alos HaShachar"], "Misheyakir": ["Misheyakir"], "Misheyakir Machmir": ["Misheyakir Machmir"], "Sunrise": ["Sunrise"], "Kriat Shema, sof zeman": ["Krias Shema, sof zman"], "Tefilah, sof zeman": ["Tefilah, sof zman"], "Kriat Shema, sof zeman (MGA)": ["Krias Shema, sof zman (MGA)"], "Kriat Shema, sof zeman (GRA)": ["Krias Shema, sof zman (GRA)"], "Tefilah, sof zeman (MGA)": ["Tefilah, sof zman (MGA)"], "Tefilah, sof zeman (GRA)": ["Tefilah, sof zman (GRA)"], "Chatzot HaLailah": ["Chatzos HaLailah"], "Chatzot HaYom": ["Chatzos"], "Chatzot hayom": ["Chatzos"], "Mincha Gedolah": ["Mincha Gedolah"], "Mincha Ketanah": ["Mincha Ketanah"], "Plag HaMincha": ["Plag HaMincha"], "Sunset": ["Sunset"], "Bein HaShemashot": ["Bein HaShemashos"], "Tzeit HaKochavim": ["Tzeis HaKochavim"], "Latest Kiddush Levana": ["Latest Kiddush Levanah"] } } };
|
|
3
3
|
|
|
4
4
|
export { poAshkenazi as default };
|
package/dist/esm/calendar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import './locale.js';
|
|
3
3
|
import { months, Locale, abs2greg, HDate } from '@hebcal/hdate';
|
|
4
4
|
import { makeCandleEvent, makeFastStartEnd, makeWeekdayChanukahCandleLighting } from './candles.js';
|
package/dist/esm/candles.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { months } from '@hebcal/hdate';
|
|
3
3
|
import { flags } from './event.js';
|
|
4
4
|
import { HolidayEvent, ChanukahEvent } from './HolidayEvent.js';
|
package/dist/esm/cities.json.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
var citiesJson = [
|
|
3
3
|
"Ashdod|IL|31.79213|34.64966|Asia/Jerusalem|27",
|
|
4
4
|
"Atlanta|US|33.749|-84.38798|America/New_York|336",
|
package/dist/esm/event.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { HDate, Locale } from '@hebcal/hdate';
|
|
3
3
|
import './locale.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { months, isDate, greg2abs, HDate, daysInGregMonth } from '@hebcal/hdate';
|
|
3
3
|
|
|
4
4
|
const { TISHREI } = months;
|
package/dist/esm/hallel.d.ts
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import { HDate } from '@hebcal/hdate';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Determines which form of Hallel (if any) is recited
|
|
4
|
+
* on a given Hebrew date.
|
|
5
|
+
*
|
|
6
|
+
* Returns 0 (none), 1 (half Hallel), or 2 (whole Hallel).
|
|
7
|
+
*
|
|
8
|
+
* Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
|
|
9
|
+
* Shmini Atzeret, Simchat Torah, Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
10
|
+
*
|
|
11
|
+
* Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
|
|
12
|
+
* Rosh Chodesh Tevet falls during Chanukah, so whole Hallel is said then.
|
|
13
|
+
*
|
|
14
|
+
* The result is computed directly from the Hebrew month and day,
|
|
15
|
+
* without generating holiday events.
|
|
16
|
+
* @example
|
|
17
|
+
* import {hallel, HDate, months} from '@hebcal/core';
|
|
18
|
+
* hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)
|
|
19
|
+
* hallel(new HDate(1, months.SHVAT, 5784), false); // 1 (Rosh Chodesh)
|
|
20
|
+
* hallel(new HDate(2, months.SHVAT, 5784), false); // 0
|
|
21
|
+
* hallel(new HDate(16, months.NISAN, 5784), false); // 2 (Pesach II, Diaspora)
|
|
22
|
+
* hallel(new HDate(16, months.NISAN, 5784), true); // 1 (Chol HaMoed, Israel)
|
|
23
|
+
* @param hdate Hebrew date to test
|
|
24
|
+
* @param il use the Israeli holiday schedule
|
|
25
|
+
* @returns 0 for no Hallel, 1 for half Hallel, 2 for whole Hallel
|
|
26
|
+
*/
|
|
27
|
+
export declare function hallel(hdate: HDate, il: boolean): number;
|
package/dist/esm/hallel.js
CHANGED
|
@@ -1,40 +1,97 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
2
|
-
import { months } from '@hebcal/hdate';
|
|
3
|
-
import {
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
|
+
import { months, HDate } from '@hebcal/hdate';
|
|
3
|
+
import { dateYomHaZikaron } from './modern.js';
|
|
4
4
|
|
|
5
5
|
const NONE = 0;
|
|
6
6
|
const HALF = 1;
|
|
7
7
|
const WHOLE = 2;
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Determines which form of Hallel (if any) is recited
|
|
10
|
+
* on a given Hebrew date.
|
|
11
|
+
*
|
|
12
|
+
* Returns 0 (none), 1 (half Hallel), or 2 (whole Hallel).
|
|
13
|
+
*
|
|
14
|
+
* Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
|
|
15
|
+
* Shmini Atzeret, Simchat Torah, Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
16
|
+
*
|
|
17
|
+
* Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
|
|
18
|
+
* Rosh Chodesh Tevet falls during Chanukah, so whole Hallel is said then.
|
|
19
|
+
*
|
|
20
|
+
* The result is computed directly from the Hebrew month and day,
|
|
21
|
+
* without generating holiday events.
|
|
22
|
+
* @example
|
|
23
|
+
* import {hallel, HDate, months} from '@hebcal/core';
|
|
24
|
+
* hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)
|
|
25
|
+
* hallel(new HDate(1, months.SHVAT, 5784), false); // 1 (Rosh Chodesh)
|
|
26
|
+
* hallel(new HDate(2, months.SHVAT, 5784), false); // 0
|
|
27
|
+
* hallel(new HDate(16, months.NISAN, 5784), false); // 2 (Pesach II, Diaspora)
|
|
28
|
+
* hallel(new HDate(16, months.NISAN, 5784), true); // 1 (Chol HaMoed, Israel)
|
|
29
|
+
* @param hdate Hebrew date to test
|
|
30
|
+
* @param il use the Israeli holiday schedule
|
|
31
|
+
* @returns 0 for no Hallel, 1 for half Hallel, 2 for whole Hallel
|
|
32
|
+
*/
|
|
33
|
+
function hallel(hdate, il) {
|
|
34
|
+
const mm = hdate.getMonth();
|
|
35
|
+
const dd = hdate.getDate();
|
|
36
|
+
switch (mm) {
|
|
37
|
+
case months.TISHREI:
|
|
38
|
+
// Sukkot (15-21), Shmini Atzeret (22), Simchat Torah (23, Diaspora)
|
|
39
|
+
if (dd >= 15 && dd <= (il ? 22 : 23)) {
|
|
40
|
+
return WHOLE;
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
case months.KISLEV:
|
|
44
|
+
// Chanukah begins 25 Kislev; the first candle on the evening of
|
|
45
|
+
// 24 Kislev precedes the first morning of Chanukah
|
|
46
|
+
if (dd >= 25) {
|
|
47
|
+
return WHOLE;
|
|
48
|
+
}
|
|
49
|
+
break;
|
|
50
|
+
case months.TEVET: {
|
|
51
|
+
// Chanukah lasts 8 days, ending on 2 Tevet (3 Tevet if Kislev is short)
|
|
52
|
+
const lastDay = HDate.shortKislev(hdate.getFullYear()) ? 3 : 2;
|
|
53
|
+
if (dd <= lastDay) {
|
|
54
|
+
return WHOLE;
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
15
57
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
58
|
+
case months.NISAN:
|
|
59
|
+
// First day(s) of Pesach
|
|
60
|
+
if (dd === 15 || (dd === 16 && !il)) {
|
|
61
|
+
return WHOLE;
|
|
62
|
+
}
|
|
63
|
+
// Remaining days of Pesach
|
|
64
|
+
if (dd >= 16 && dd <= (il ? 21 : 22)) {
|
|
65
|
+
return HALF;
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
case months.IYYAR: {
|
|
69
|
+
const year = hdate.getFullYear();
|
|
70
|
+
// Yom Yerushalayim
|
|
71
|
+
if (dd === 28 && year >= 5727) {
|
|
72
|
+
return WHOLE;
|
|
73
|
+
}
|
|
74
|
+
// Yom Ha'atzmaut, the day after Yom HaZikaron
|
|
75
|
+
const yomHaZikaron = dateYomHaZikaron(year);
|
|
76
|
+
if (yomHaZikaron !== null && dd === yomHaZikaron.getDate() + 1) {
|
|
77
|
+
return WHOLE;
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
34
80
|
}
|
|
81
|
+
case months.SIVAN:
|
|
82
|
+
// Shavuot
|
|
83
|
+
if (dd === 6 || (dd === 7 && !il)) {
|
|
84
|
+
return WHOLE;
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
// Rosh Chodesh: the 30th of any month, or the 1st of any month
|
|
89
|
+
// other than Tishrei (Rosh Hashana)
|
|
90
|
+
if (dd === 30 || (dd === 1 && mm !== months.TISHREI)) {
|
|
91
|
+
return HALF;
|
|
35
92
|
}
|
|
36
93
|
return NONE;
|
|
37
94
|
}
|
|
38
95
|
|
|
39
|
-
export {
|
|
96
|
+
export { hallel };
|
|
40
97
|
//# sourceMappingURL=hallel.js.map
|
package/dist/esm/hallel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hallel.js","sources":["../../../src/hallel.ts"],"sourcesContent":["import {HDate, months} from '@hebcal/hdate';\nimport {
|
|
1
|
+
{"version":3,"file":"hallel.js","sources":["../../../src/hallel.ts"],"sourcesContent":["import {HDate, months} from '@hebcal/hdate';\nimport {dateYomHaZikaron} from './modern.js';\n\nconst NONE = 0;\nconst HALF = 1;\nconst WHOLE = 2;\n\n/**\n * Determines which form of Hallel (if any) is recited\n * on a given Hebrew date.\n *\n * Returns 0 (none), 1 (half Hallel), or 2 (whole Hallel).\n *\n * Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,\n * Shmini Atzeret, Simchat Torah, Yom Ha'atzmaut, and Yom Yerushalayim.\n *\n * Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.\n * Rosh Chodesh Tevet falls during Chanukah, so whole Hallel is said then.\n *\n * The result is computed directly from the Hebrew month and day,\n * without generating holiday events.\n * @example\n * import {hallel, HDate, months} from '@hebcal/core';\n * hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)\n * hallel(new HDate(1, months.SHVAT, 5784), false); // 1 (Rosh Chodesh)\n * hallel(new HDate(2, months.SHVAT, 5784), false); // 0\n * hallel(new HDate(16, months.NISAN, 5784), false); // 2 (Pesach II, Diaspora)\n * hallel(new HDate(16, months.NISAN, 5784), true); // 1 (Chol HaMoed, Israel)\n * @param hdate Hebrew date to test\n * @param il use the Israeli holiday schedule\n * @returns 0 for no Hallel, 1 for half Hallel, 2 for whole Hallel\n */\nexport function hallel(hdate: HDate, il: boolean): number {\n const mm = hdate.getMonth();\n const dd = hdate.getDate();\n switch (mm) {\n case months.TISHREI:\n // Sukkot (15-21), Shmini Atzeret (22), Simchat Torah (23, Diaspora)\n if (dd >= 15 && dd <= (il ? 22 : 23)) {\n return WHOLE;\n }\n break;\n case months.KISLEV:\n // Chanukah begins 25 Kislev; the first candle on the evening of\n // 24 Kislev precedes the first morning of Chanukah\n if (dd >= 25) {\n return WHOLE;\n }\n break;\n case months.TEVET: {\n // Chanukah lasts 8 days, ending on 2 Tevet (3 Tevet if Kislev is short)\n const lastDay = HDate.shortKislev(hdate.getFullYear()) ? 3 : 2;\n if (dd <= lastDay) {\n return WHOLE;\n }\n break;\n }\n case months.NISAN:\n // First day(s) of Pesach\n if (dd === 15 || (dd === 16 && !il)) {\n return WHOLE;\n }\n // Remaining days of Pesach\n if (dd >= 16 && dd <= (il ? 21 : 22)) {\n return HALF;\n }\n break;\n case months.IYYAR: {\n const year = hdate.getFullYear();\n // Yom Yerushalayim\n if (dd === 28 && year >= 5727) {\n return WHOLE;\n }\n // Yom Ha'atzmaut, the day after Yom HaZikaron\n const yomHaZikaron = dateYomHaZikaron(year);\n if (yomHaZikaron !== null && dd === yomHaZikaron.getDate() + 1) {\n return WHOLE;\n }\n break;\n }\n case months.SIVAN:\n // Shavuot\n if (dd === 6 || (dd === 7 && !il)) {\n return WHOLE;\n }\n break;\n default:\n break;\n }\n\n // Rosh Chodesh: the 30th of any month, or the 1st of any month\n // other than Tishrei (Rosh Hashana)\n if (dd === 30 || (dd === 1 && mm !== months.TISHREI)) {\n return HALF;\n }\n\n return NONE;\n}\n"],"names":[],"mappings":";;;;AAGA,MAAM,IAAI,GAAG,CAAC;AACd,MAAM,IAAI,GAAG,C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;AAEA,YAAA,MAAM,YAAY,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAC3C,YAAA,IAAI,YAAY,KAAK,IAAI,IAAI,EAAE,KAAK,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;AAC9D,gBAAA,OAAO,KAAK;YACd;YACA;QACF;QACA,KAAK,MAAM,CAAC,KAAK;;AAEf,YAAA,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AACjC,gBAAA,OAAO,KAAK;YACd;YACA;;;;AAOJ,IAAA,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC,EAAE;AACpD,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,OAAO,IAAI;AACb;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
var noNikudOverride = { "headers": { "plural-forms": "nplurals=2; plural=(n != 1);", "language": "he-x-NoNikud" }, "contexts": { "": { "Korach": ["קורח"], "Chukat": ["חוקת"], "Erev Yom Kippur": ["ערב יום כיפור"], "Yom Kippur": ["יום כיפור"], "Yom Kippur Katan": ["יום כיפור קטן"], "Pesach Shabbat Chol ha-Moed": ["שבת חול המועד פסח"], "Sukkot Shabbat Chol ha-Moed": ["שבת חול המועד סוכות"], "Erev Sukkot": ["ערב סוכות"], "Sukkot": ["סוכות"], "Sukkot I": ["סוכות א׳"], "Sukkot II": ["סוכות ב׳"], "Sukkot II (CH''M)": ["סוכות ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סוכות ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סוכות ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סוכות ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סוכות ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סוכות ז׳ (הושענא רבה)"], "Swords of Iron War Memorial Day": ["יום הזיכרון לחללי מלחמת חרבות ברזל"], "Latest Kiddush Levana": ["סוף זמן קידוש לבנה"] } } };
|
|
3
3
|
|
|
4
4
|
export { noNikudOverride as default };
|
package/dist/esm/he.po.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
var poHe = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "he_IL" }, "contexts": { "": { "Shabbat": ["שַׁבָּת"], "Parashat": ["פָּרָשַׁת"], "Achrei Mot": ["אַחֲרֵי מוֹת"], "Balak": ["בָּלָק"], "Bamidbar": ["בְּמִדְבַּר"], "Bechukotai": ["בְּחֻקֹּתַי"], "Beha'alotcha": ["בְּהַעֲלֹתְךָ"], "Behar": ["בְּהַר"], "Bereshit": ["בְּרֵאשִׁית"], "Beshalach": ["בְּשַׁלַּח"], "Bo": ["בֹּא"], "Chayei Sara": ["חַיֵּי שָֹרָה"], "Chukat": ["חֻקַּת"], "Devarim": ["דְּבָרִים"], "Eikev": ["עֵקֶב"], "Emor": ["אֱמוֹר"], "Ha'azinu": ["הַאֲזִינוּ"], "Kedoshim": ["קְדֹשִׁים"], "Ki Tavo": ["כִּי־תָבוֹא"], "Ki Teitzei": ["כִּי־תֵצֵא"], "Ki Tisa": ["כִּי תִשָּׂא"], "Korach": ["קֹרַח"], "Lech-Lecha": ["לֶךְ־לְךָ"], "Masei": ["מַסְעֵי"], "Matot": ["מַטּוֹת"], "Metzora": ["מְצֹרָע"], "Miketz": ["מִקֵּץ"], "Mishpatim": ["מִשְׁפָּטִים"], "Nasso": ["נָשׂא"], "Nitzavim": ["נִצָּבִים"], "Noach": ["נֹחַ"], "Pekudei": ["פְקוּדֵי"], "Pinchas": ["פִּינְחָס"], "Re'eh": ["רְאֵה"], "Sh'lach": ["שְׁלַח־לְךָ"], "Shemot": ["שְׁמוֹת"], "Shmini": ["שְּׁמִינִי"], "Shoftim": ["שׁוֹפְטִים"], "Tazria": ["תַזְרִיעַ"], "Terumah": ["תְּרוּמָה"], "Tetzaveh": ["תְּצַוֶּה"], "Toldot": ["תּוֹלְדוֹת"], "Tzav": ["צַו"], "Vaera": ["וָאֵרָא"], "Vaetchanan": ["וָאֶתְחַנַּן"], "Vayakhel": ["וַיַּקְהֵל"], "Vayechi": ["וַיְחִי"], "Vayeilech": ["וַיֵּלֶךְ"], "Vayera": ["וַיֵּרָא"], "Vayeshev": ["וַיֵּשֶׁב"], "Vayetzei": ["וַיֵּצֵא"], "Vayigash": ["וַיִּגַּשׁ"], "Vayikra": ["וַיִּקְרָא"], "Vayishlach": ["וַיִּשְׁלַח"], "Vezot Haberakhah": ["וְזֹאת הַבְּרָכָה"], "Yitro": ["יִתְרוֹ"], "Asara B'Tevet": ["עֲשָׂרָה בְּטֵבֵת"], "Candle lighting": ["הַדְלָקַת נֵרוֹת"], "Chanukah": ["חֲנוּכָּה"], "Chanukah: 1 Candle": ["חֲנוּכָּה: א׳ נֵר"], "Chanukah: 2 Candles": ["חֲנוּכָּה: ב׳ נֵרוֹת"], "Chanukah: 3 Candles": ["חֲנוּכָּה: ג׳ נֵרוֹת"], "Chanukah: 4 Candles": ["חֲנוּכָּה: ד׳ נֵרוֹת"], "Chanukah: 5 Candles": ["חֲנוּכָּה: ה׳ נֵרוֹת"], "Chanukah: 6 Candles": ["חֲנוּכָּה: ו׳ נֵרוֹת"], "Chanukah: 7 Candles": ["חֲנוּכָּה: ז׳ נֵרוֹת"], "Chanukah: 8 Candles": ["חֲנוּכָּה: ח׳ נֵרוֹת"], "Chanukah: 8th Day": ["חֲנוּכָּה: יוֹם ח׳"], "Days of the Omer": ["סְפִירַת הָעוֹמֶר"], "Omer": ["עוֹמֶר"], "day of the Omer": ["בָּעוֹמֶר"], "Erev Pesach": ["עֶרֶב פֶּסַח"], "Erev Purim": ["עֶרֶב פּוּרִים"], "Erev Rosh Hashana": ["עֶרֶב רֹאשׁ הַשָּׁנָה"], "Erev Shavuot": ["עֶרֶב שָׁבוּעוֹת"], "Erev Simchat Torah": ["עֶרֶב שִׂמְחַת תּוֹרָה"], "Erev Sukkot": ["עֶרֶב סֻכּוֹת"], "Erev Tish'a B'Av": ["עֶרֶב תִּשְׁעָה בְּאָב"], "Erev Yom Kippur": ["עֶרֶב יוֹם כִּפּוּר"], "Havdalah": ["הַבְדָּלָה"], "Lag BaOmer": ["ל״ג בָּעוֹמֶר"], "Leil Selichot": ["סְלִיחוֹת"], "Pesach": ["פֶּסַח"], "Pesach I": ["פֶּסַח א׳"], "Pesach II": ["פֶּסַח ב׳"], "Pesach II (CH''M)": ["פֶּסַח ב׳ (חוה״מ)"], "Pesach III (CH''M)": ["פֶּסַח ג׳ (חוה״מ)"], "Pesach IV (CH''M)": ["פֶּסַח ד׳ (חוה״מ)"], "Pesach Sheni": ["פֶּסַח שֵׁנִי"], "Pesach V (CH''M)": ["פֶּסַח ה׳ (חוה״מ)"], "Pesach VI (CH''M)": ["פֶּסַח ו׳ (חוה״מ)"], "Pesach VII": ["פֶּסַח ז׳"], "Pesach VIII": ["פֶּסַח ח׳"], "Pesach Shabbat Chol ha-Moed": ["שַׁבַּת חֹל הַמּוֹעֵד פֶּסַח"], "Purim": ["פּוּרִים"], "Purim Katan": ["פּוּרִים קָטָן"], "Rosh Chodesh": ["רֹאשׁ חוֹדֶשׁ"], "Rosh Hashana": ["רֹאשׁ הַשָּׁנָה"], "Rosh Hashana I": ["רֹאשׁ הַשָּׁנָה א׳"], "Rosh Hashana II": ["רֹאשׁ הַשָּׁנָה ב׳"], "Shabbat Chazon": ["שַׁבַּת חֲזוֹן"], "Shabbat HaChodesh": ["שַׁבַּת הַחֹדֶשׁ"], "Shabbat HaGadol": ["שַׁבַּת הַגָּדוֹל"], "Shabbat Nachamu": ["שַׁבַּת נַחֲמוּ"], "Shabbat Parah": ["שַׁבַּת פָּרָה"], "Shabbat Shekalim": ["שַׁבַּת שְׁקָלִים"], "Shabbat Shuva": ["שַׁבַּת שׁוּבָה"], "Shabbat Zachor": ["שַׁבַּת זָכוֹר"], "Shavuot": ["שָׁבוּעוֹת"], "Shavuot I": ["שָׁבוּעוֹת א׳"], "Shavuot II": ["שָׁבוּעוֹת ב׳"], "Shmini Atzeret": ["שְׁמִינִי עֲצֶרֶת"], "Shushan Purim": ["שׁוּשָׁן פּוּרִים"], "Sigd": ["חַג הַסִּיגְד"], "Simchat Torah": ["שִׂמְחַת תּוֹרָה"], "Sukkot": ["סֻכּוֹת"], "Sukkot I": ["סֻכּוֹת א׳"], "Sukkot II": ["סֻכּוֹת ב׳"], "Sukkot II (CH''M)": ["סֻכּוֹת ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סֻכּוֹת ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סֻכּוֹת ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סֻכּוֹת ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סֻכּוֹת ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סֻכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"], "Sukkot Shabbat Chol ha-Moed": ["שַׁבַּת חֹל הַמּוֹעֵד סֻכּוֹת"], "Ta'anit Bechorot": ["תַּעֲנִית בְּכוֹרוֹת"], "Ta'anit BeHaB": ["תַּעֲנִית בה״ב"], "Ta'anit Esther": ["תַּעֲנִית אֶסְתֵּר"], "Tish'a B'Av": ["תִּשְׁעָה בְּאָב"], "Tu B'Av": ["ט״וּ בְּאָב"], "Tu BiShvat": ["ט״וּ בִּשְׁבָט"], "Tu B'Shvat": ["ט״וּ בִּשְׁבָט"], "Tzom Gedaliah": ["צוֹם גְּדַלְיָה"], "Tzom Tammuz": ["צוֹם י״ז בְּתַמּוּז"], "Yom HaAtzma'ut": ["יוֹם הָעַצְמָאוּת"], "Yom HaShoah": ["יוֹם הַשּׁוֹאָה"], "Yom HaZikaron": ["יוֹם הַזִּכָּרוֹן"], "Yom Kippur": ["יוֹם כִּפּוּר"], "Yom Yerushalayim": ["יוֹם יְרוּשָׁלַיִם"], "Yom HaAliyah": ["יוֹם הַעֲלִיָּה"], "Yom HaAliyah School Observance": ["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"], "Rosh Chodesh Adar": ["רֹאשׁ חוֹדֶשׁ אֲדָר"], "Rosh Chodesh Adar I": ["רֹאשׁ חוֹדֶשׁ אֲדָר א׳"], "Rosh Chodesh Adar II": ["רֹאשׁ חוֹדֶשׁ אֲדָר ב׳"], "Rosh Chodesh Av": ["רֹאשׁ חוֹדֶשׁ אָב"], "Rosh Chodesh Cheshvan": ["רֹאשׁ חוֹדֶשׁ חֶשְׁוָן"], "Rosh Chodesh Elul": ["רֹאשׁ חוֹדֶשׁ אֱלוּל"], "Rosh Chodesh Iyyar": ["רֹאשׁ חוֹדֶשׁ אִיָּיר"], "Rosh Chodesh Kislev": ["רֹאשׁ חוֹדֶשׁ כִּסְלֵו"], "Rosh Chodesh Nisan": ["רֹאשׁ חוֹדֶשׁ נִיסָן"], "Rosh Chodesh Sh'vat": ["רֹאשׁ חוֹדֶשׁ שְׁבָט"], "Rosh Chodesh Sivan": ["רֹאשׁ חוֹדֶשׁ סִיוָן"], "Rosh Chodesh Tamuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tammuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tevet": ["רֹאשׁ חוֹדֶשׁ טֵבֵת"], "min": ["דַּקּוֹת"], "Fast begins": ["תְּחִילַּת הַצוֹם"], "Fast ends": ["סִיּוּם הַצוֹם"], "Rosh Hashana LaBehemot": ["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"], "Tish'a B'Av (observed)": ["(תִּשְׁעָה בְּאָב (נִדְחָה"], "Shabbat Mevarchim Chodesh": ["שַׁבַּת מְבָרְכִים חוֹדֶשׁ"], "Shabbat Shirah": ["שַׁבַּת שִׁירָה"], "Lovingkindness": ["חֶסֶד"], "Might": ["גְּבוּרָה"], "Beauty": ["תִּפְאֶרֶת"], "Eternity": ["נֶּצַח"], "Splendor": ["הוֹד"], "Foundation": ["יְּסוֹד"], "Majesty": ["מַּלְכוּת"], "day": ["יוֹם"], "Yom Kippur Katan": ["יוֹם כִּפּוּר קָטָן"], "Yizkor": ["יִזְכּוֹר"], "Family Day": ["יוֹם הַמִּשׁפָּחָה"], "Yitzhak Rabin Memorial Day": ["יוֹם הַזִּכָּרוֹן לְיִצְחָק רַבִּין"], "Jabotinsky Day": ["יוֹם זַ׳בּוֹטִינְסְקִי"], "Herzl Day": ["יוֹם הֶרְצְל"], "Ben-Gurion Day": ["יוֹם בֶּן־גּוּרִיּוֹן"], "Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"], "Birkat Hachamah": ["בִּרְכַּת הַחַמָּה"], "Birkat HaChamah": ["בִּרְכַּת הַחַמָּה"], "Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"], "Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"], "Chag HaBanot": ["חַג הַבָּנוֹת"], "Molad": ["מוֹלָד הָלְּבָנָה"], "chalakim": ["חֲלָקִים"], "Alot HaShachar": ["עֲלוֹת הַשַּׁחַר"], "Misheyakir": ["מִשֶּׁיַּכִּיר"], "Misheyakir Machmir": ["מִשֶּׁיַּכִּיר מַחְמִיר"], "Sunrise": ["נֵץ הַחַמָּה"], "Kriat Shema, sof zeman": ["סוֹף זְמַן קְרִיאַת שְׁמַע"], "Tefilah, sof zeman": ["סוֹף זְמַן תְּפִלָּה"], "Kriat Shema, sof zeman (MGA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (מג״א)"], "Kriat Shema, sof zeman (GRA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (גְּרָ״א)"], "Tefilah, sof zeman (MGA)": ["סוֹף זְמַן תְּפִלָּה (מג״א)"], "Tefilah, sof zeman (GRA)": ["סוֹף זְמַן תְּפִלָּה (גְּרָ״א)"], "Chatzot HaLailah": ["חֲצוֹת הַלַּיְלָה"], "Chatzot HaYom": ["חֲצוֹת הַיּוֹם"], "Chatzot hayom": ["חֲצוֹת הַיּוֹם"], "Mincha Gedolah": ["מִנְחָה גְּדוֹלָה"], "Mincha Ketanah": ["מִנְחָה קְטַנָּה"], "Plag HaMincha": ["פְּלַג הַמִּנְחָה"], "Sunset": ["שְׁקִיעַת הַחַמָּה"], "Bein HaShemashot": ["בֵּין הַשְּׁמָשׁוֹת"], "Tzeit HaKochavim": ["צֵאת הַכּוֹכָבִים"], "Biur Chametz": ["בִּעוּר חָמֵץ"], "Finish eating chametz": ["סוֹף זְמַן אֲכִילַת חָמֵץ"], "Swords of Iron War Memorial Day": ["יוֹם הַזִּכָּרוֹן לְחַלְלֵי מִלְחֶמֶת חַרְבוֹת בַּרְזֶל"], "Latest Kiddush Levana": ["סוֹף זְמַן קִדּוּשׁ לְבָנָה"] } } };
|
|
3
3
|
|
|
4
4
|
export { poHe as default };
|
package/dist/esm/hebcal.d.ts
CHANGED
|
@@ -219,15 +219,9 @@ export declare class HebrewCalendar {
|
|
|
219
219
|
*/
|
|
220
220
|
static getSedra(hyear: number, il: boolean): Sedra;
|
|
221
221
|
/**
|
|
222
|
-
* Determines which form of Hallel (if any) is recited
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* Returns 0 (none), 1 (half Hallel), or 2 (whole Hallel).
|
|
226
|
-
*
|
|
227
|
-
* Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
|
|
228
|
-
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
229
|
-
*
|
|
230
|
-
* Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
|
|
222
|
+
* Determines which form of Hallel (if any) is recited on a given Hebrew date:
|
|
223
|
+
* 0 (none), 1 (half Hallel), or 2 (whole Hallel).
|
|
224
|
+
* See {@link hallel} for details.
|
|
231
225
|
* @example
|
|
232
226
|
* import {HebrewCalendar, HDate, months} from '@hebcal/core';
|
|
233
227
|
* HebrewCalendar.hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)
|
package/dist/esm/hebcal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { birthdayOrAnniversary, yahrzeit, HDate } from '@hebcal/hdate';
|
|
3
3
|
import './locale.js';
|
|
4
4
|
import { version } from './pkgVersion.js';
|
|
5
5
|
import { getSedra } from './sedra.js';
|
|
6
|
-
import {
|
|
6
|
+
import { hallel } from './hallel.js';
|
|
7
7
|
import { getHolidaysForYear_, getHolidaysForYearArray, getHolidaysOnDate } from './holidays.js';
|
|
8
8
|
import { reformatTimeStr } from './reformatTimeStr.js';
|
|
9
9
|
import { tachanun } from './tachanun.js';
|
|
@@ -269,15 +269,9 @@ class HebrewCalendar {
|
|
|
269
269
|
return getSedra(hyear, il);
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
|
-
* Determines which form of Hallel (if any) is recited
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* Returns 0 (none), 1 (half Hallel), or 2 (whole Hallel).
|
|
276
|
-
*
|
|
277
|
-
* Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
|
|
278
|
-
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
279
|
-
*
|
|
280
|
-
* Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
|
|
272
|
+
* Determines which form of Hallel (if any) is recited on a given Hebrew date:
|
|
273
|
+
* 0 (none), 1 (half Hallel), or 2 (whole Hallel).
|
|
274
|
+
* See {@link hallel} for details.
|
|
281
275
|
* @example
|
|
282
276
|
* import {HebrewCalendar, HDate, months} from '@hebcal/core';
|
|
283
277
|
* HebrewCalendar.hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)
|
|
@@ -288,11 +282,7 @@ class HebrewCalendar {
|
|
|
288
282
|
* @returns 0 for no Hallel, 1 for half Hallel, 2 for whole Hallel
|
|
289
283
|
*/
|
|
290
284
|
static hallel(hdate, il) {
|
|
291
|
-
|
|
292
|
-
if (!events) {
|
|
293
|
-
return 0;
|
|
294
|
-
}
|
|
295
|
-
return hallel_(events, hdate);
|
|
285
|
+
return hallel(hdate, il);
|
|
296
286
|
}
|
|
297
287
|
/**
|
|
298
288
|
* Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.
|