@hebcal/core 6.0.2 → 6.0.4
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 +65 -28
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +16 -16
- 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.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.js +1 -1
- package/dist/esm/candles.js +1 -1
- package/dist/esm/event.js +1 -1
- package/dist/esm/getStartAndEnd.js +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.js +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/isAssurBemlacha.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 +40 -11
- package/dist/esm/molad.js.map +1 -1
- package/dist/esm/omer.js +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.d.ts +1 -1
- package/dist/esm/sedra.js +3 -2
- package/dist/esm/sedra.js.map +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/pkgVersion.d.ts +1 -1
- package/dist/sedra.d.ts +1 -1
- package/package.json +5 -5
package/dist/bundle.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @hebcal/core v6.0.
|
|
1
|
+
/*! @hebcal/core v6.0.4, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
6
|
-
const version = '6.0.
|
|
6
|
+
const version = '6.0.4';
|
|
7
7
|
|
|
8
|
-
/*! @hebcal/hdate v0.21.
|
|
8
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
9
9
|
/* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
|
|
10
10
|
/** @private */
|
|
11
11
|
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
@@ -146,7 +146,7 @@ function abs2greg(abs) {
|
|
|
146
146
|
return dt;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
/*! @hebcal/hdate v0.21.
|
|
149
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
150
150
|
|
|
151
151
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
|
|
152
152
|
/**
|
|
@@ -161,7 +161,7 @@ exports.greg.greg2abs = greg2abs;
|
|
|
161
161
|
exports.greg.isDate = isDate;
|
|
162
162
|
exports.greg.isLeapYear = isGregLeapYear;
|
|
163
163
|
|
|
164
|
-
/*! @hebcal/hdate v0.21.
|
|
164
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
165
165
|
/**
|
|
166
166
|
* Removes niqqud from Hebrew string
|
|
167
167
|
*/
|
|
@@ -171,7 +171,7 @@ function hebrewStripNikkud(str) {
|
|
|
171
171
|
return a.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
/*! @hebcal/hdate v0.21.
|
|
174
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
175
175
|
|
|
176
176
|
/*
|
|
177
177
|
* More minimal HDate
|
|
@@ -558,7 +558,7 @@ function monthFromName(monthName) {
|
|
|
558
558
|
throw new RangeError(`bad monthName: ${monthName}`);
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
-
/*! @hebcal/hdate v0.21.
|
|
561
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
562
562
|
|
|
563
563
|
const NISAN$3 = months.NISAN;
|
|
564
564
|
const CHESHVAN = months.CHESHVAN;
|
|
@@ -671,7 +671,7 @@ function getBirthdayHD(hyear, date) {
|
|
|
671
671
|
return { yy: hyear, mm: month, dd: day };
|
|
672
672
|
}
|
|
673
673
|
|
|
674
|
-
/*! @hebcal/hdate v0.21.
|
|
674
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
675
675
|
const GERESH = '׳';
|
|
676
676
|
const GERSHAYIM = '״';
|
|
677
677
|
const heb2num = {
|
|
@@ -784,7 +784,7 @@ function gematriyaStrToNum(str) {
|
|
|
784
784
|
return num;
|
|
785
785
|
}
|
|
786
786
|
|
|
787
|
-
/*! @hebcal/hdate v0.21.
|
|
787
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
788
788
|
|
|
789
789
|
/**
|
|
790
790
|
* Calculates the molad for a Hebrew month
|
|
@@ -817,7 +817,7 @@ function molad(year, month) {
|
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
819
|
|
|
820
|
-
/*! @hebcal/hdate v0.21.
|
|
820
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
821
821
|
/**
|
|
822
822
|
* Formats a number with leading zeros so the resulting string is 4 digits long.
|
|
823
823
|
* Similar to `string.padStart(4, '0')` but will also format
|
|
@@ -850,7 +850,7 @@ function pad2(num) {
|
|
|
850
850
|
return String(num);
|
|
851
851
|
}
|
|
852
852
|
|
|
853
|
-
/*! @hebcal/hdate v0.21.
|
|
853
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
854
854
|
|
|
855
855
|
const _formatters = new Map();
|
|
856
856
|
/**
|
|
@@ -912,13 +912,13 @@ function isoDateString(dt) {
|
|
|
912
912
|
pad2(dt.getDate()));
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
-
/*! @hebcal/hdate v0.21.
|
|
915
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
916
916
|
var poAshkenazi$1 = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "en_CA@ashkenazi" }, "contexts": { "": { "Tevet": ["Teves"] } } };
|
|
917
917
|
|
|
918
|
-
/*! @hebcal/hdate v0.21.
|
|
918
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
919
919
|
var poHe$1 = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "he" }, "contexts": { "": { "Adar": ["אֲדָר"], "Adar I": ["אֲדָר א׳"], "Adar II": ["אֲדָר ב׳"], "Av": ["אָב"], "Cheshvan": ["חֶשְׁוָן"], "Elul": ["אֱלוּל"], "Iyyar": ["אִיָּיר"], "Kislev": ["כִּסְלֵו"], "Nisan": ["נִיסָן"], "Sh'vat": ["שְׁבָט"], "Sivan": ["סִיוָן"], "Tamuz": ["תַּמּוּז"], "Tevet": ["טֵבֵת"], "Tishrei": ["תִּשְׁרֵי"] } } };
|
|
920
920
|
|
|
921
|
-
/*! @hebcal/hdate v0.21.
|
|
921
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
922
922
|
|
|
923
923
|
const noopLocale = {
|
|
924
924
|
headers: { 'plural-forms': 'nplurals=2; plural=(n!=1);' },
|
|
@@ -1110,7 +1110,7 @@ Locale.addLocale('he', poHe$1);
|
|
|
1110
1110
|
const poHeNoNikud$1 = Locale.copyLocaleNoNikud(poHe$1);
|
|
1111
1111
|
Locale.addLocale('he-x-NoNikud', poHeNoNikud$1);
|
|
1112
1112
|
|
|
1113
|
-
/*! @hebcal/hdate v0.21.
|
|
1113
|
+
/*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
1114
1114
|
|
|
1115
1115
|
/*
|
|
1116
1116
|
Hebcal - A Jewish Calendar Generator
|
|
@@ -1400,18 +1400,25 @@ class HDate {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
/**
|
|
1402
1402
|
* Renders this Hebrew date in Hebrew gematriya, regardless of locale.
|
|
1403
|
+
* @param suppressNikud - suppress nekudot (default false)
|
|
1404
|
+
* @param suppressYear - suppress Hebrew year (default false)
|
|
1403
1405
|
* @example
|
|
1404
1406
|
* import {HDate, months} from '@hebcal/hdate';
|
|
1405
1407
|
* const hd = new HDate(15, months.CHESHVAN, 5769);
|
|
1406
1408
|
* hd.renderGematriya(); // 'ט״ו חֶשְׁוָן תשס״ט'
|
|
1407
1409
|
* hd.renderGematriya(true); // 'ט״ו חשון תשס״ט'
|
|
1410
|
+
* hd.renderGematriya(false, true); // 'ט״ו חֶשְׁוָן'
|
|
1408
1411
|
*/
|
|
1409
|
-
renderGematriya(suppressNikud = false) {
|
|
1412
|
+
renderGematriya(suppressNikud = false, suppressYear = false) {
|
|
1410
1413
|
const d = this.getDate();
|
|
1411
1414
|
const locale = suppressNikud ? 'he-x-NoNikud' : 'he';
|
|
1412
1415
|
const m = Locale.gettext(this.getMonthName(), locale);
|
|
1416
|
+
const prefix = gematriya(d) + ' ' + m;
|
|
1417
|
+
if (suppressYear) {
|
|
1418
|
+
return prefix;
|
|
1419
|
+
}
|
|
1413
1420
|
const y = this.getFullYear();
|
|
1414
|
-
return
|
|
1421
|
+
return prefix + ' ' + gematriya(y);
|
|
1415
1422
|
}
|
|
1416
1423
|
/**
|
|
1417
1424
|
* Returns an `HDate` corresponding to the specified day of week
|
|
@@ -8653,7 +8660,7 @@ class Sedra {
|
|
|
8653
8660
|
}
|
|
8654
8661
|
/**
|
|
8655
8662
|
* The 54 parshiyot of the Torah as transilterated strings.
|
|
8656
|
-
* parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[52] == "Ha'azinu".
|
|
8663
|
+
* parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[52] == "Ha'azinu", parshiot[53] == 'Vezot Haberakhah'.
|
|
8657
8664
|
* @readonly
|
|
8658
8665
|
* @type {string[]}
|
|
8659
8666
|
*/
|
|
@@ -8711,6 +8718,7 @@ const parshiot = [
|
|
|
8711
8718
|
'Nitzavim',
|
|
8712
8719
|
'Vayeilech',
|
|
8713
8720
|
"Ha'azinu",
|
|
8721
|
+
'Vezot Haberakhah',
|
|
8714
8722
|
];
|
|
8715
8723
|
// 0-based parsha IDs
|
|
8716
8724
|
const parsha2id = new Map();
|
|
@@ -10345,7 +10353,15 @@ function makeWeekdayChanukahCandleLighting(ev, options) {
|
|
|
10345
10353
|
}
|
|
10346
10354
|
|
|
10347
10355
|
/* eslint-disable camelcase */
|
|
10348
|
-
const
|
|
10356
|
+
const enDoW = [
|
|
10357
|
+
'Sunday',
|
|
10358
|
+
'Monday',
|
|
10359
|
+
'Tuesday',
|
|
10360
|
+
'Wednesday',
|
|
10361
|
+
'Thursday',
|
|
10362
|
+
'Friday',
|
|
10363
|
+
'Saturday',
|
|
10364
|
+
];
|
|
10349
10365
|
const heDayNames = [
|
|
10350
10366
|
'רִאשׁוֹן',
|
|
10351
10367
|
'שֵׁנִי',
|
|
@@ -10355,8 +10371,25 @@ const heDayNames = [
|
|
|
10355
10371
|
'שִׁישִּׁי',
|
|
10356
10372
|
'שַׁבָּת',
|
|
10357
10373
|
];
|
|
10358
|
-
const
|
|
10374
|
+
const frDoW = [
|
|
10375
|
+
'Dimanche',
|
|
10376
|
+
'Lundi',
|
|
10377
|
+
'Mardi',
|
|
10378
|
+
'Mercredi',
|
|
10379
|
+
'Jeudi',
|
|
10380
|
+
'Vendredi',
|
|
10381
|
+
'Samedi',
|
|
10382
|
+
];
|
|
10359
10383
|
const night = 'בַּלַּ֥יְלָה';
|
|
10384
|
+
function getDayNames(locale) {
|
|
10385
|
+
if (locale === 'he' || locale === 'he-x-nonikud' || locale === 'h') {
|
|
10386
|
+
return heDayNames;
|
|
10387
|
+
}
|
|
10388
|
+
else if (locale === 'fr') {
|
|
10389
|
+
return frDoW;
|
|
10390
|
+
}
|
|
10391
|
+
return enDoW;
|
|
10392
|
+
}
|
|
10360
10393
|
function getHebrewTimeOfDay(hour) {
|
|
10361
10394
|
if (hour < 5)
|
|
10362
10395
|
return night;
|
|
@@ -10430,9 +10463,8 @@ class Molad {
|
|
|
10430
10463
|
locale = locale.toLowerCase();
|
|
10431
10464
|
}
|
|
10432
10465
|
const isHebrewLocale = locale === 'he' || locale === 'he-x-nonikud' || locale === 'h';
|
|
10433
|
-
const isFrenchLocale = locale === 'fr';
|
|
10434
10466
|
const monthName = Locale.gettext(this.getMonthName(), locale);
|
|
10435
|
-
const dayNames =
|
|
10467
|
+
const dayNames = getDayNames(locale);
|
|
10436
10468
|
const dow = dayNames[this.getDow()];
|
|
10437
10469
|
const minutes = this.getMinutes();
|
|
10438
10470
|
const hour = this.getHour();
|
|
@@ -10441,21 +10473,26 @@ class Molad {
|
|
|
10441
10473
|
const minutesStr = (_a = Locale.lookupTranslation('min', locale)) !== null && _a !== void 0 ? _a : 'minutes';
|
|
10442
10474
|
const chalakimStr = Locale.gettext('chalakim', locale);
|
|
10443
10475
|
const and = Locale.gettext('and', locale);
|
|
10444
|
-
const after = Locale.gettext('after', locale);
|
|
10445
10476
|
if (isHebrewLocale) {
|
|
10446
10477
|
const ampm = getHebrewTimeOfDay(hour);
|
|
10447
|
-
|
|
10478
|
+
let result = `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` +
|
|
10448
10479
|
`בְּשָׁעָה ${hour} ${ampm}, ` +
|
|
10449
|
-
`ו-${minutes} ${minutesStr}
|
|
10450
|
-
|
|
10480
|
+
`ו-${minutes} ${minutesStr}`;
|
|
10481
|
+
if (chalakim !== 0) {
|
|
10482
|
+
result += ` ו-${chalakim} ${chalakimStr}`;
|
|
10483
|
+
}
|
|
10451
10484
|
if (locale === 'he-x-nonikud') {
|
|
10452
10485
|
return Locale.hebrewStripNikkud(result);
|
|
10453
10486
|
}
|
|
10454
10487
|
return result;
|
|
10455
10488
|
}
|
|
10456
|
-
const fmtTime = reformatTimeStr(`${hour}
|
|
10489
|
+
const fmtTime = reformatTimeStr(`${hour}:${minutes}`, 'pm', options);
|
|
10457
10490
|
const month = monthName.replace(/'/g, '’');
|
|
10458
|
-
|
|
10491
|
+
const result = `${moladStr} ${month}: ${dow}, ${fmtTime}`;
|
|
10492
|
+
if (chalakim === 0) {
|
|
10493
|
+
return result;
|
|
10494
|
+
}
|
|
10495
|
+
return result + ` ${and} ${chalakim} ${chalakimStr}`;
|
|
10459
10496
|
}
|
|
10460
10497
|
}
|
|
10461
10498
|
/** Represents a Molad announcement on Shabbat Mevarchim */
|