@hebcal/core 5.4.9 → 5.4.10
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 +29 -32
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +2 -2
- package/dist/bundle.min.js.map +1 -1
- package/dist/event.d.ts +27 -27
- package/dist/hebcal.d.ts +1 -0
- package/dist/index.cjs +29 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +29 -32
- package/dist/index.mjs.map +1 -1
- package/dist/pkgVersion.d.ts +1 -1
- package/dist/staticHolidays.d.ts +74 -74
- package/package.json +6 -6
package/dist/event.d.ts
CHANGED
|
@@ -8,59 +8,59 @@ import './locale';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const flags: {
|
|
10
10
|
/** Chag, yontiff, yom tov */
|
|
11
|
-
CHAG:
|
|
11
|
+
readonly CHAG: 1;
|
|
12
12
|
/** Light candles 18 minutes before sundown */
|
|
13
|
-
LIGHT_CANDLES:
|
|
13
|
+
readonly LIGHT_CANDLES: 2;
|
|
14
14
|
/** End of holiday (end of Yom Tov) */
|
|
15
|
-
YOM_TOV_ENDS:
|
|
15
|
+
readonly YOM_TOV_ENDS: 4;
|
|
16
16
|
/** Observed only in the Diaspora (chutz l'aretz) */
|
|
17
|
-
CHUL_ONLY:
|
|
17
|
+
readonly CHUL_ONLY: 8;
|
|
18
18
|
/** Observed only in Israel */
|
|
19
|
-
IL_ONLY:
|
|
19
|
+
readonly IL_ONLY: 16;
|
|
20
20
|
/** Light candles in the evening at Tzeit time (3 small stars) */
|
|
21
|
-
LIGHT_CANDLES_TZEIS:
|
|
21
|
+
readonly LIGHT_CANDLES_TZEIS: 32;
|
|
22
22
|
/** Candle-lighting for Chanukah */
|
|
23
|
-
CHANUKAH_CANDLES:
|
|
23
|
+
readonly CHANUKAH_CANDLES: 64;
|
|
24
24
|
/** Rosh Chodesh, beginning of a new Hebrew month */
|
|
25
|
-
ROSH_CHODESH:
|
|
25
|
+
readonly ROSH_CHODESH: 128;
|
|
26
26
|
/** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */
|
|
27
|
-
MINOR_FAST:
|
|
27
|
+
readonly MINOR_FAST: 256;
|
|
28
28
|
/** Shabbat Shekalim, Zachor, ... */
|
|
29
|
-
SPECIAL_SHABBAT:
|
|
29
|
+
readonly SPECIAL_SHABBAT: 512;
|
|
30
30
|
/** Weekly sedrot on Saturdays */
|
|
31
|
-
PARSHA_HASHAVUA:
|
|
31
|
+
readonly PARSHA_HASHAVUA: 1024;
|
|
32
32
|
/** Daily page of Talmud (Bavli) */
|
|
33
|
-
DAF_YOMI:
|
|
33
|
+
readonly DAF_YOMI: 2048;
|
|
34
34
|
/** Days of the Omer */
|
|
35
|
-
OMER_COUNT:
|
|
35
|
+
readonly OMER_COUNT: 4096;
|
|
36
36
|
/** Yom HaShoah, Yom HaAtzma'ut, ... */
|
|
37
|
-
MODERN_HOLIDAY:
|
|
37
|
+
readonly MODERN_HOLIDAY: 8192;
|
|
38
38
|
/** Yom Kippur and Tish'a B'Av */
|
|
39
|
-
MAJOR_FAST:
|
|
39
|
+
readonly MAJOR_FAST: 16384;
|
|
40
40
|
/** On the Saturday before Rosh Chodesh */
|
|
41
|
-
SHABBAT_MEVARCHIM:
|
|
41
|
+
readonly SHABBAT_MEVARCHIM: 32768;
|
|
42
42
|
/** Molad */
|
|
43
|
-
MOLAD:
|
|
43
|
+
readonly MOLAD: 65536;
|
|
44
44
|
/** Yahrzeit or Hebrew Anniversary */
|
|
45
|
-
USER_EVENT:
|
|
45
|
+
readonly USER_EVENT: 131072;
|
|
46
46
|
/** Daily Hebrew date ("11th of Sivan, 5780") */
|
|
47
|
-
HEBREW_DATE:
|
|
47
|
+
readonly HEBREW_DATE: 262144;
|
|
48
48
|
/** A holiday that's not major, modern, rosh chodesh, or a fast day */
|
|
49
|
-
MINOR_HOLIDAY:
|
|
49
|
+
readonly MINOR_HOLIDAY: 524288;
|
|
50
50
|
/** Evening before a major or minor holiday */
|
|
51
|
-
EREV:
|
|
51
|
+
readonly EREV: 1048576;
|
|
52
52
|
/** Chol haMoed, intermediate days of Pesach or Sukkot */
|
|
53
|
-
CHOL_HAMOED:
|
|
53
|
+
readonly CHOL_HAMOED: 2097152;
|
|
54
54
|
/** Mishna Yomi */
|
|
55
|
-
MISHNA_YOMI:
|
|
55
|
+
readonly MISHNA_YOMI: 4194304;
|
|
56
56
|
/** Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh */
|
|
57
|
-
YOM_KIPPUR_KATAN:
|
|
57
|
+
readonly YOM_KIPPUR_KATAN: 8388608;
|
|
58
58
|
/** Daily page of Jerusalem Talmud (Yerushalmi) */
|
|
59
|
-
YERUSHALMI_YOMI:
|
|
59
|
+
readonly YERUSHALMI_YOMI: 16777216;
|
|
60
60
|
/** Nach Yomi */
|
|
61
|
-
NACH_YOMI:
|
|
61
|
+
readonly NACH_YOMI: 33554432;
|
|
62
62
|
/** Daily Learning */
|
|
63
|
-
DAILY_LEARNING:
|
|
63
|
+
readonly DAILY_LEARNING: 67108864;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Represents an Event with a title, date, and flags.
|
package/dist/hebcal.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { TachanunResult } from './tachanun';
|
|
|
13
13
|
* Event names can be rendered in several languges using the `locale` option.
|
|
14
14
|
*/
|
|
15
15
|
export declare class HebrewCalendar {
|
|
16
|
+
private constructor();
|
|
16
17
|
/**
|
|
17
18
|
* Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
|
|
18
19
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.4.
|
|
1
|
+
/*! @hebcal/core v5.4.10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
|
|
@@ -9107,7 +9107,7 @@ class Sedra {
|
|
|
9107
9107
|
*/
|
|
9108
9108
|
find(parsha) {
|
|
9109
9109
|
if (typeof parsha === 'number') {
|
|
9110
|
-
if (parsha
|
|
9110
|
+
if (parsha >= parshiot.length || (parsha < 0 && !isValidDouble(parsha))) {
|
|
9111
9111
|
throw new RangeError(`Invalid parsha number: ${parsha}`);
|
|
9112
9112
|
}
|
|
9113
9113
|
const idx = this.theSedraArray.indexOf(parsha);
|
|
@@ -9133,29 +9133,27 @@ class Sedra {
|
|
|
9133
9133
|
return new HDate(this.firstSaturday + idx * 7);
|
|
9134
9134
|
}
|
|
9135
9135
|
}
|
|
9136
|
-
else if (Array.isArray(parsha)
|
|
9137
|
-
parsha.length
|
|
9138
|
-
typeof parsha[0]
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
typeof parsha[1] === 'string') {
|
|
9136
|
+
else if (Array.isArray(parsha)) {
|
|
9137
|
+
const plen = parsha.length;
|
|
9138
|
+
if ((plen !== 1 && plen !== 2) || typeof parsha[0] !== 'string') {
|
|
9139
|
+
throw new TypeError(`Invalid parsha argument: ${JSON.stringify(parsha)}`);
|
|
9140
|
+
}
|
|
9141
|
+
if (plen === 1) {
|
|
9142
|
+
return this.find(parsha[0]);
|
|
9143
|
+
}
|
|
9145
9144
|
const p1 = parsha[0];
|
|
9146
9145
|
const p2 = parsha[1];
|
|
9147
9146
|
const num1 = parsha2id.get(p1);
|
|
9148
9147
|
const num2 = parsha2id.get(p2);
|
|
9149
|
-
if (
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9148
|
+
if (typeof num1 !== 'number' ||
|
|
9149
|
+
typeof num2 !== 'number' ||
|
|
9150
|
+
num2 !== num1 + 1 ||
|
|
9151
|
+
!isValidDouble(-num1)) {
|
|
9153
9152
|
throw new RangeError(`Unrecognized parsha name: ${p1}-${p2}`);
|
|
9154
9153
|
}
|
|
9154
|
+
return this.find(-num1);
|
|
9155
9155
|
}
|
|
9156
|
-
|
|
9157
|
-
throw new TypeError(`Invalid parsha argument: ${parsha}`);
|
|
9158
|
-
}
|
|
9156
|
+
return null; /* NOTREACHED */
|
|
9159
9157
|
}
|
|
9160
9158
|
/**
|
|
9161
9159
|
* Returns the underlying annual sedra schedule.
|
|
@@ -10104,17 +10102,6 @@ const staticModernHolidays = [
|
|
|
10104
10102
|
},
|
|
10105
10103
|
];
|
|
10106
10104
|
|
|
10107
|
-
const minorHolidays = [
|
|
10108
|
-
holidayDesc.LAG_BAOMER,
|
|
10109
|
-
holidayDesc.LEIL_SELICHOT,
|
|
10110
|
-
holidayDesc.PESACH_SHENI,
|
|
10111
|
-
holidayDesc.EREV_PURIM,
|
|
10112
|
-
holidayDesc.PURIM_KATAN,
|
|
10113
|
-
holidayDesc.SHUSHAN_PURIM,
|
|
10114
|
-
holidayDesc.TU_BAV,
|
|
10115
|
-
holidayDesc.TU_BISHVAT,
|
|
10116
|
-
holidayDesc.ROSH_HASHANA_LABEHEMOT,
|
|
10117
|
-
];
|
|
10118
10105
|
/** Represents a built-in holiday like Pesach, Purim or Tu BiShvat */
|
|
10119
10106
|
class HolidayEvent extends Event {
|
|
10120
10107
|
basename() {
|
|
@@ -10164,8 +10151,17 @@ class HolidayEvent extends Event {
|
|
|
10164
10151
|
}
|
|
10165
10152
|
// Don't depend on flags.MINOR_HOLIDAY always being set. Look for minor holidays.
|
|
10166
10153
|
const desc = this.getDesc();
|
|
10167
|
-
|
|
10168
|
-
|
|
10154
|
+
switch (desc) {
|
|
10155
|
+
case holidayDesc.LAG_BAOMER:
|
|
10156
|
+
case holidayDesc.LEIL_SELICHOT:
|
|
10157
|
+
case holidayDesc.PESACH_SHENI:
|
|
10158
|
+
case holidayDesc.EREV_PURIM:
|
|
10159
|
+
case holidayDesc.PURIM_KATAN:
|
|
10160
|
+
case holidayDesc.SHUSHAN_PURIM:
|
|
10161
|
+
case holidayDesc.TU_BAV:
|
|
10162
|
+
case holidayDesc.TU_BISHVAT:
|
|
10163
|
+
case holidayDesc.ROSH_HASHANA_LABEHEMOT:
|
|
10164
|
+
return ['holiday', 'minor'];
|
|
10169
10165
|
}
|
|
10170
10166
|
return ['holiday', 'major'];
|
|
10171
10167
|
}
|
|
@@ -10343,7 +10339,7 @@ class DailyLearning {
|
|
|
10343
10339
|
}
|
|
10344
10340
|
|
|
10345
10341
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
10346
|
-
const version = '5.4.
|
|
10342
|
+
const version = '5.4.10';
|
|
10347
10343
|
|
|
10348
10344
|
/* eslint-disable max-len */
|
|
10349
10345
|
/**
|
|
@@ -11388,6 +11384,7 @@ function observedInDiaspora(ev) {
|
|
|
11388
11384
|
* Event names can be rendered in several languges using the `locale` option.
|
|
11389
11385
|
*/
|
|
11390
11386
|
class HebrewCalendar {
|
|
11387
|
+
constructor() { }
|
|
11391
11388
|
/**
|
|
11392
11389
|
* Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
|
|
11393
11390
|
*
|