@hebcal/core 5.7.6 → 5.8.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/CalOptions.d.ts +12 -0
- package/dist/bundle.js +63 -2
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +22 -2
- package/dist/bundle.min.js.map +1 -1
- package/dist/calendar.d.ts +1 -0
- package/dist/esm/CalOptions.d.ts +12 -0
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.js +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +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.d.ts +1 -0
- package/dist/esm/calendar.js +20 -2
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.js +1 -1
- package/dist/esm/event.d.ts +2 -0
- package/dist/esm/event.js +3 -1
- package/dist/esm/event.js.map +1 -1
- package/dist/esm/getStartAndEnd.js +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.d.ts +1 -0
- package/dist/esm/hebcal.js +2 -1
- package/dist/esm/hebcal.js.map +1 -1
- package/dist/esm/holidays.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/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/omer.js +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.d.ts +9 -0
- package/dist/esm/parshaYear.js +29 -0
- package/dist/esm/parshaYear.js.map +1 -0
- 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/staticHolidays.js +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/zmanim.js +1 -1
- package/dist/event.d.ts +2 -0
- package/dist/hebcal.d.ts +1 -0
- package/dist/index.cjs +46 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/parshaYear.d.ts +9 -0
- package/dist/pkgVersion.d.ts +1 -1
- package/package.json +3 -3
package/dist/CalOptions.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ export type CalOptions = {
|
|
|
111
111
|
molad?: boolean;
|
|
112
112
|
/**
|
|
113
113
|
* use Ashkenazi transliterations for event titles (default Sephardi transliterations)
|
|
114
|
+
* @deprecated use `event.render('ashkenazi')` instead
|
|
114
115
|
*/
|
|
115
116
|
ashkenazi?: boolean;
|
|
116
117
|
/**
|
|
@@ -155,4 +156,15 @@ export type CalOptions = {
|
|
|
155
156
|
dailyLearning?: {
|
|
156
157
|
[x: string]: DailyLearningValue;
|
|
157
158
|
};
|
|
159
|
+
/**
|
|
160
|
+
* Yizkor (Hebrew: יִזְכּוֹר) is an Ashkenazi Jewish memorial prayer service
|
|
161
|
+
* for the dead. Yizkor is recited in synagogue as part of the service
|
|
162
|
+
* during four holidays each year:
|
|
163
|
+
* 1. Yom Kippur
|
|
164
|
+
* 2. Shmini Atzeret
|
|
165
|
+
* 3. The final day of Passover (8th day Pesach in Diaspora, 7th day
|
|
166
|
+
* Pesach in Israel)
|
|
167
|
+
* 4. Shavuot (2nd day Shavuot in Diaspora)
|
|
168
|
+
*/
|
|
169
|
+
yizkor?: boolean;
|
|
158
170
|
};
|
package/dist/bundle.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/*! @hebcal/core v5.
|
|
1
|
+
/*! @hebcal/core v5.8.0 */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
6
|
-
const version = '5.
|
|
6
|
+
const version = '5.8.0';
|
|
7
7
|
|
|
8
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
8
9
|
/* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
|
|
9
10
|
/** @private */
|
|
10
11
|
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
@@ -136,6 +137,8 @@ function abs2greg(abs) {
|
|
|
136
137
|
return dt;
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
141
|
+
|
|
139
142
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
|
|
140
143
|
/**
|
|
141
144
|
* Gregorian date helper functions
|
|
@@ -148,6 +151,7 @@ exports.greg.greg2abs = greg2abs;
|
|
|
148
151
|
exports.greg.isDate = isDate;
|
|
149
152
|
exports.greg.isLeapYear = isGregLeapYear;
|
|
150
153
|
|
|
154
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
151
155
|
/*
|
|
152
156
|
* More minimal HDate
|
|
153
157
|
*/
|
|
@@ -474,6 +478,7 @@ function monthFromName(monthName) {
|
|
|
474
478
|
return ADAR_I$2;
|
|
475
479
|
}
|
|
476
480
|
return ADAR_II$2;
|
|
481
|
+
// else assume sheini
|
|
477
482
|
}
|
|
478
483
|
break;
|
|
479
484
|
case 'ס':
|
|
@@ -510,6 +515,7 @@ function monthFromName(monthName) {
|
|
|
510
515
|
throw new RangeError(`Unable to parse month name: ${monthName}`);
|
|
511
516
|
}
|
|
512
517
|
|
|
518
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
513
519
|
const NISAN$3 = months.NISAN;
|
|
514
520
|
const CHESHVAN = months.CHESHVAN;
|
|
515
521
|
const KISLEV$1 = months.KISLEV;
|
|
@@ -604,6 +610,7 @@ function getBirthdayHD(hyear, date) {
|
|
|
604
610
|
};
|
|
605
611
|
}
|
|
606
612
|
|
|
613
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
607
614
|
const GERESH = '׳';
|
|
608
615
|
const GERSHAYIM = '״';
|
|
609
616
|
const alefbet = {
|
|
@@ -719,6 +726,7 @@ function gematriyaStrToNum(str) {
|
|
|
719
726
|
return num;
|
|
720
727
|
}
|
|
721
728
|
|
|
729
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
722
730
|
const sefirot = {
|
|
723
731
|
en: {
|
|
724
732
|
infix: 'within ',
|
|
@@ -893,6 +901,8 @@ function omerEmoji(omerDay) {
|
|
|
893
901
|
return String.fromCodePoint(codePoint);
|
|
894
902
|
}
|
|
895
903
|
|
|
904
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
905
|
+
|
|
896
906
|
/**
|
|
897
907
|
* Calculates the molad for a Hebrew month
|
|
898
908
|
*/
|
|
@@ -923,6 +933,7 @@ function molad(year, month) {
|
|
|
923
933
|
};
|
|
924
934
|
}
|
|
925
935
|
|
|
936
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
926
937
|
/**
|
|
927
938
|
* Formats a number with leading zeros so the resulting string is 4 digits long.
|
|
928
939
|
* Similar to `string.padStart(4, '0')` but will also format
|
|
@@ -952,6 +963,7 @@ function pad2(num) {
|
|
|
952
963
|
return String(num);
|
|
953
964
|
}
|
|
954
965
|
|
|
966
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
955
967
|
const _formatters = new Map();
|
|
956
968
|
/**
|
|
957
969
|
* @private
|
|
@@ -1007,6 +1019,7 @@ function isoDateString(dt) {
|
|
|
1007
1019
|
return pad4(dt.getFullYear()) + '-' + pad2(dt.getMonth() + 1) + '-' + pad2(dt.getDate());
|
|
1008
1020
|
}
|
|
1009
1021
|
|
|
1022
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
1010
1023
|
var poAshkenazi$1 = {
|
|
1011
1024
|
"headers": {
|
|
1012
1025
|
"plural-forms": "nplurals=2; plural=(n > 1);"
|
|
@@ -1018,6 +1031,7 @@ var poAshkenazi$1 = {
|
|
|
1018
1031
|
}
|
|
1019
1032
|
};
|
|
1020
1033
|
|
|
1034
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
1021
1035
|
var poHe$1 = {
|
|
1022
1036
|
"headers": {
|
|
1023
1037
|
"plural-forms": "nplurals=2; plural=(n > 1);"
|
|
@@ -1042,6 +1056,7 @@ var poHe$1 = {
|
|
|
1042
1056
|
}
|
|
1043
1057
|
};
|
|
1044
1058
|
|
|
1059
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
1045
1060
|
const noopLocale = {
|
|
1046
1061
|
headers: {
|
|
1047
1062
|
'plural-forms': 'nplurals=2; plural=(n!=1);'
|
|
@@ -1250,6 +1265,8 @@ const poHeNoNikud$1 = {
|
|
|
1250
1265
|
};
|
|
1251
1266
|
Locale.addLocale('he-x-NoNikud', poHeNoNikud$1);
|
|
1252
1267
|
|
|
1268
|
+
/*! @hebcal/hdate v0.12.0 */
|
|
1269
|
+
|
|
1253
1270
|
/*
|
|
1254
1271
|
Hebcal - A Jewish Calendar Generator
|
|
1255
1272
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -2064,6 +2081,8 @@ const flags = {
|
|
|
2064
2081
|
NACH_YOMI: 0x2000000,
|
|
2065
2082
|
/** Daily Learning */
|
|
2066
2083
|
DAILY_LEARNING: 0x4000000,
|
|
2084
|
+
/** Yizkor */
|
|
2085
|
+
YIZKOR: 0x8000000,
|
|
2067
2086
|
};
|
|
2068
2087
|
const flagToCategory = [
|
|
2069
2088
|
[flags.MAJOR_FAST, 'holiday', 'major', 'fast'],
|
|
@@ -12437,6 +12456,28 @@ class ParshaEvent extends Event {
|
|
|
12437
12456
|
}
|
|
12438
12457
|
}
|
|
12439
12458
|
|
|
12459
|
+
/**
|
|
12460
|
+
* Calculates weekly Torah Reading on Saturdays for entire year
|
|
12461
|
+
* @param year Hebrew year
|
|
12462
|
+
* @param il Israel (false for Diaspora)
|
|
12463
|
+
* @returns an array of `ParshaEvent` occurring on Saturdays that contain a regular
|
|
12464
|
+
* (non-holiday) Parashat HaShavua
|
|
12465
|
+
*/
|
|
12466
|
+
function parshaYear(year, il) {
|
|
12467
|
+
const sedra = getSedra(year, il);
|
|
12468
|
+
const startAbs = sedra.getFirstSaturday();
|
|
12469
|
+
const endAbs = HDate.hebrew2abs(year, months.ELUL, 29);
|
|
12470
|
+
const events = [];
|
|
12471
|
+
for (let absDt = startAbs; absDt <= endAbs; absDt += 7) {
|
|
12472
|
+
const parsha = sedra.lookup(absDt);
|
|
12473
|
+
if (!parsha.chag) {
|
|
12474
|
+
const ev = new ParshaEvent(parsha.hdate, parsha.parsha, il, parsha.num);
|
|
12475
|
+
events.push(ev);
|
|
12476
|
+
}
|
|
12477
|
+
}
|
|
12478
|
+
return events;
|
|
12479
|
+
}
|
|
12480
|
+
|
|
12440
12481
|
const SUN$1 = 0;
|
|
12441
12482
|
const TUE$1 = 2;
|
|
12442
12483
|
const FRI$2 = 5;
|
|
@@ -13215,6 +13256,7 @@ function startEndHebrew(theMonth, theYear, numYears) {
|
|
|
13215
13256
|
* * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
|
|
13216
13257
|
* * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
|
|
13217
13258
|
* * Yom Kippur Katan (`options.yomKippurKatan`)
|
|
13259
|
+
* * Yizkor (`options.yizkor`)
|
|
13218
13260
|
*
|
|
13219
13261
|
* Daily Study of texts are supported by the
|
|
13220
13262
|
* {@link https://github.com/hebcal/hebcal-learning @hebcal/learning} package,
|
|
@@ -13381,6 +13423,16 @@ function calendar(options = {}) {
|
|
|
13381
13423
|
if (candlesEv) {
|
|
13382
13424
|
evts.push(candlesEv);
|
|
13383
13425
|
}
|
|
13426
|
+
if (options.yizkor) {
|
|
13427
|
+
const mm = hd.getMonth();
|
|
13428
|
+
const dd = hd.getDate();
|
|
13429
|
+
if ((mm === months.TISHREI && (dd === 10 || dd === 22)) ||
|
|
13430
|
+
(mm === NISAN && dd === (il ? 21 : 22)) ||
|
|
13431
|
+
(mm === SIVAN && dd === (il ? 6 : 7))) {
|
|
13432
|
+
const ev = new Event(hd, 'Yizkor', flags.YIZKOR, { emoji: '🕯️' });
|
|
13433
|
+
evts.push(ev);
|
|
13434
|
+
}
|
|
13435
|
+
}
|
|
13384
13436
|
if (options.addHebrewDates ||
|
|
13385
13437
|
(options.addHebrewDatesForEvents && prevEventsLength !== evts.length)) {
|
|
13386
13438
|
const e2 = new HebrewDateEvent(hd);
|
|
@@ -13421,6 +13473,7 @@ const MINOR_HOLIDAY = flags.MINOR_HOLIDAY;
|
|
|
13421
13473
|
const EREV = flags.EREV;
|
|
13422
13474
|
const CHOL_HAMOED = flags.CHOL_HAMOED;
|
|
13423
13475
|
const YOM_KIPPUR_KATAN = flags.YOM_KIPPUR_KATAN;
|
|
13476
|
+
const YIZKOR = flags.YIZKOR;
|
|
13424
13477
|
const unrecognizedAlreadyWarned = new Set();
|
|
13425
13478
|
const RECOGNIZED_OPTIONS = {
|
|
13426
13479
|
location: 1,
|
|
@@ -13454,6 +13507,7 @@ const RECOGNIZED_OPTIONS = {
|
|
|
13454
13507
|
hour12: 1,
|
|
13455
13508
|
dailyLearning: 1,
|
|
13456
13509
|
useElevation: 1,
|
|
13510
|
+
yizkor: 1,
|
|
13457
13511
|
};
|
|
13458
13512
|
/**
|
|
13459
13513
|
* @private
|
|
@@ -13614,6 +13668,9 @@ function getMaskFromOptions(options) {
|
|
|
13614
13668
|
if (options.yomKippurKatan) {
|
|
13615
13669
|
mask |= YOM_KIPPUR_KATAN;
|
|
13616
13670
|
}
|
|
13671
|
+
if (options.yizkor) {
|
|
13672
|
+
mask |= YIZKOR;
|
|
13673
|
+
}
|
|
13617
13674
|
if (options.dailyLearning) {
|
|
13618
13675
|
const dailyLearning = options.dailyLearning;
|
|
13619
13676
|
if (dailyLearning.dafYomi) {
|
|
@@ -13669,6 +13726,8 @@ function setOptionsFromMask(options) {
|
|
|
13669
13726
|
options.shabbatMevarchim = true;
|
|
13670
13727
|
if (m & YOM_KIPPUR_KATAN)
|
|
13671
13728
|
options.yomKippurKatan = true;
|
|
13729
|
+
if (m & YIZKOR)
|
|
13730
|
+
options.yizkor = true;
|
|
13672
13731
|
return m;
|
|
13673
13732
|
}
|
|
13674
13733
|
/**
|
|
@@ -13839,6 +13898,7 @@ class HebrewCalendar {
|
|
|
13839
13898
|
* * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
|
|
13840
13899
|
* * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
|
|
13841
13900
|
* * Yom Kippur Katan (`options.yomKippurKatan`)
|
|
13901
|
+
* * Yizkor (`options.yizkor`)
|
|
13842
13902
|
*
|
|
13843
13903
|
* Daily Study of texts are supported by the
|
|
13844
13904
|
* {@link https://github.com/hebcal/hebcal-learning @hebcal/learning} package,
|
|
@@ -14130,6 +14190,7 @@ exports.getHolidaysOnDate = getHolidaysOnDate;
|
|
|
14130
14190
|
exports.getSedra = getSedra;
|
|
14131
14191
|
exports.holidayDesc = holidayDesc;
|
|
14132
14192
|
exports.months = months;
|
|
14193
|
+
exports.parshaYear = parshaYear;
|
|
14133
14194
|
exports.parshiot = parshiot;
|
|
14134
14195
|
exports.version = version;
|
|
14135
14196
|
|