@hebcal/core 6.0.3 → 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 +63 -27
- 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.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/pkgVersion.d.ts +1 -1
- package/package.json +2 -2
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
|
|
@@ -10346,7 +10353,15 @@ function makeWeekdayChanukahCandleLighting(ev, options) {
|
|
|
10346
10353
|
}
|
|
10347
10354
|
|
|
10348
10355
|
/* eslint-disable camelcase */
|
|
10349
|
-
const
|
|
10356
|
+
const enDoW = [
|
|
10357
|
+
'Sunday',
|
|
10358
|
+
'Monday',
|
|
10359
|
+
'Tuesday',
|
|
10360
|
+
'Wednesday',
|
|
10361
|
+
'Thursday',
|
|
10362
|
+
'Friday',
|
|
10363
|
+
'Saturday',
|
|
10364
|
+
];
|
|
10350
10365
|
const heDayNames = [
|
|
10351
10366
|
'רִאשׁוֹן',
|
|
10352
10367
|
'שֵׁנִי',
|
|
@@ -10356,8 +10371,25 @@ const heDayNames = [
|
|
|
10356
10371
|
'שִׁישִּׁי',
|
|
10357
10372
|
'שַׁבָּת',
|
|
10358
10373
|
];
|
|
10359
|
-
const
|
|
10374
|
+
const frDoW = [
|
|
10375
|
+
'Dimanche',
|
|
10376
|
+
'Lundi',
|
|
10377
|
+
'Mardi',
|
|
10378
|
+
'Mercredi',
|
|
10379
|
+
'Jeudi',
|
|
10380
|
+
'Vendredi',
|
|
10381
|
+
'Samedi',
|
|
10382
|
+
];
|
|
10360
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
|
+
}
|
|
10361
10393
|
function getHebrewTimeOfDay(hour) {
|
|
10362
10394
|
if (hour < 5)
|
|
10363
10395
|
return night;
|
|
@@ -10431,9 +10463,8 @@ class Molad {
|
|
|
10431
10463
|
locale = locale.toLowerCase();
|
|
10432
10464
|
}
|
|
10433
10465
|
const isHebrewLocale = locale === 'he' || locale === 'he-x-nonikud' || locale === 'h';
|
|
10434
|
-
const isFrenchLocale = locale === 'fr';
|
|
10435
10466
|
const monthName = Locale.gettext(this.getMonthName(), locale);
|
|
10436
|
-
const dayNames =
|
|
10467
|
+
const dayNames = getDayNames(locale);
|
|
10437
10468
|
const dow = dayNames[this.getDow()];
|
|
10438
10469
|
const minutes = this.getMinutes();
|
|
10439
10470
|
const hour = this.getHour();
|
|
@@ -10442,21 +10473,26 @@ class Molad {
|
|
|
10442
10473
|
const minutesStr = (_a = Locale.lookupTranslation('min', locale)) !== null && _a !== void 0 ? _a : 'minutes';
|
|
10443
10474
|
const chalakimStr = Locale.gettext('chalakim', locale);
|
|
10444
10475
|
const and = Locale.gettext('and', locale);
|
|
10445
|
-
const after = Locale.gettext('after', locale);
|
|
10446
10476
|
if (isHebrewLocale) {
|
|
10447
10477
|
const ampm = getHebrewTimeOfDay(hour);
|
|
10448
|
-
|
|
10478
|
+
let result = `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` +
|
|
10449
10479
|
`בְּשָׁעָה ${hour} ${ampm}, ` +
|
|
10450
|
-
`ו-${minutes} ${minutesStr}
|
|
10451
|
-
|
|
10480
|
+
`ו-${minutes} ${minutesStr}`;
|
|
10481
|
+
if (chalakim !== 0) {
|
|
10482
|
+
result += ` ו-${chalakim} ${chalakimStr}`;
|
|
10483
|
+
}
|
|
10452
10484
|
if (locale === 'he-x-nonikud') {
|
|
10453
10485
|
return Locale.hebrewStripNikkud(result);
|
|
10454
10486
|
}
|
|
10455
10487
|
return result;
|
|
10456
10488
|
}
|
|
10457
|
-
const fmtTime = reformatTimeStr(`${hour}
|
|
10489
|
+
const fmtTime = reformatTimeStr(`${hour}:${minutes}`, 'pm', options);
|
|
10458
10490
|
const month = monthName.replace(/'/g, '’');
|
|
10459
|
-
|
|
10491
|
+
const result = `${moladStr} ${month}: ${dow}, ${fmtTime}`;
|
|
10492
|
+
if (chalakim === 0) {
|
|
10493
|
+
return result;
|
|
10494
|
+
}
|
|
10495
|
+
return result + ` ${and} ${chalakim} ${chalakimStr}`;
|
|
10460
10496
|
}
|
|
10461
10497
|
}
|
|
10462
10498
|
/** Represents a Molad announcement on Shabbat Mevarchim */
|