@hebcal/core 3.31.2 → 3.33.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/README.md +118 -5
- package/dist/bundle.js +4312 -3764
- package/dist/bundle.min.js +2 -2
- package/dist/hdate-bundle.js +10 -2
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +18 -10
- package/dist/hdate.mjs +18 -10
- package/dist/index.js +344 -150
- package/dist/index.mjs +344 -150
- package/hebcal.d.ts +3 -0
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v3.
|
|
1
|
+
/*! @hebcal/core v3.33.0 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -395,7 +395,7 @@ const Locale = {
|
|
|
395
395
|
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
396
396
|
* @return {string}
|
|
397
397
|
*/
|
|
398
|
-
lookupTranslation: function (id, locale) {
|
|
398
|
+
lookupTranslation: function lookupTranslation(id, locale) {
|
|
399
399
|
const locale0 = locale && locale.toLowerCase();
|
|
400
400
|
const loc = typeof locale == 'string' && this.locales[locale0] || this.activeLocale;
|
|
401
401
|
const array = loc[id];
|
|
@@ -413,7 +413,7 @@ const Locale = {
|
|
|
413
413
|
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
414
414
|
* @return {string}
|
|
415
415
|
*/
|
|
416
|
-
gettext: function (id, locale) {
|
|
416
|
+
gettext: function gettext(id, locale) {
|
|
417
417
|
const text = this.lookupTranslation(id, locale);
|
|
418
418
|
|
|
419
419
|
if (typeof text == 'undefined') {
|
|
@@ -428,7 +428,7 @@ const Locale = {
|
|
|
428
428
|
* @param {string} locale Locale name (i.e.: `'he'`, `'fr'`)
|
|
429
429
|
* @param {LocaleDate} data parsed data from a `.po` file.
|
|
430
430
|
*/
|
|
431
|
-
addLocale: function (locale, data) {
|
|
431
|
+
addLocale: function addLocale(locale, data) {
|
|
432
432
|
if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
|
|
433
433
|
throw new TypeError(`Locale '${locale}' invalid compact format`);
|
|
434
434
|
}
|
|
@@ -443,7 +443,7 @@ const Locale = {
|
|
|
443
443
|
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
|
|
444
444
|
* @return {LocaleData}
|
|
445
445
|
*/
|
|
446
|
-
useLocale: function (locale) {
|
|
446
|
+
useLocale: function useLocale(locale) {
|
|
447
447
|
const locale0 = locale.toLowerCase();
|
|
448
448
|
const obj = this.locales[locale0];
|
|
449
449
|
|
|
@@ -460,16 +460,24 @@ const Locale = {
|
|
|
460
460
|
* Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
|
|
461
461
|
* @return {string}
|
|
462
462
|
*/
|
|
463
|
-
getLocaleName: function () {
|
|
463
|
+
getLocaleName: function getLocaleName() {
|
|
464
464
|
return this.activeName;
|
|
465
465
|
},
|
|
466
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Returns the names of registered locales
|
|
469
|
+
* @return {string[]}
|
|
470
|
+
*/
|
|
471
|
+
getLocaleNames: function getLocaleNames() {
|
|
472
|
+
return Object.keys(this.locales).sort();
|
|
473
|
+
},
|
|
474
|
+
|
|
467
475
|
/**
|
|
468
476
|
* @param {number} n
|
|
469
477
|
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
470
478
|
* @return {string}
|
|
471
479
|
*/
|
|
472
|
-
ordinal: function (n, locale) {
|
|
480
|
+
ordinal: function ordinal(n, locale) {
|
|
473
481
|
const locale1 = locale && locale.toLowerCase();
|
|
474
482
|
const locale0 = locale1 || this.activeName;
|
|
475
483
|
|
|
@@ -505,7 +513,7 @@ const Locale = {
|
|
|
505
513
|
* @param {number} n
|
|
506
514
|
* @return {string}
|
|
507
515
|
*/
|
|
508
|
-
getEnOrdinal: function (n) {
|
|
516
|
+
getEnOrdinal: function getEnOrdinal(n) {
|
|
509
517
|
const s = ['th', 'st', 'nd', 'rd'];
|
|
510
518
|
const v = n % 100;
|
|
511
519
|
return n + (s[(v - 20) % 10] || s[v] || s[0]);
|
|
@@ -516,7 +524,7 @@ const Locale = {
|
|
|
516
524
|
* @param {string} str
|
|
517
525
|
* @return {string}
|
|
518
526
|
*/
|
|
519
|
-
hebrewStripNikkud: function (str) {
|
|
527
|
+
hebrewStripNikkud: function hebrewStripNikkud(str) {
|
|
520
528
|
return str.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
|
|
521
529
|
}
|
|
522
530
|
};
|
|
@@ -613,7 +621,7 @@ const monthNames0 = ['', 'Nisan', 'Iyyar', 'Sivan', 'Tamuz', 'Av', 'Elul', 'Tish
|
|
|
613
621
|
|
|
614
622
|
const monthNames = [monthNames0.concat(['Adar', 'Nisan']), monthNames0.concat(['Adar I', 'Adar II', 'Nisan'])]; // eslint-disable-next-line require-jsdoc
|
|
615
623
|
|
|
616
|
-
function throwTypeError$
|
|
624
|
+
function throwTypeError$3(msg) {
|
|
617
625
|
throw new TypeError(msg);
|
|
618
626
|
}
|
|
619
627
|
|
|
@@ -648,7 +656,7 @@ const UNITS_VALID = {
|
|
|
648
656
|
|
|
649
657
|
/** Represents a Hebrew date */
|
|
650
658
|
|
|
651
|
-
class HDate
|
|
659
|
+
class HDate {
|
|
652
660
|
/**
|
|
653
661
|
* Create a Hebrew date. There are 3 basic forms for the `HDate()` constructor.
|
|
654
662
|
*
|
|
@@ -717,13 +725,13 @@ class HDate$1 {
|
|
|
717
725
|
} // 1 argument
|
|
718
726
|
|
|
719
727
|
|
|
720
|
-
const abs0 = typeof day === 'number' && !isNaN(day) ? day : greg.isDate(day) ? greg.greg2abs(day) : HDate
|
|
728
|
+
const abs0 = typeof day === 'number' && !isNaN(day) ? day : greg.isDate(day) ? greg.greg2abs(day) : HDate.isHDate(day) ? {
|
|
721
729
|
dd: day.day,
|
|
722
730
|
mm: day.month,
|
|
723
731
|
yy: day.year
|
|
724
|
-
} : throwTypeError$
|
|
732
|
+
} : throwTypeError$3(`HDate called with bad argument: ${day}`);
|
|
725
733
|
const isNumber = typeof abs0 === 'number';
|
|
726
|
-
const d = isNumber ? HDate
|
|
734
|
+
const d = isNumber ? HDate.abs2hebrew(abs0) : abs0;
|
|
727
735
|
/**
|
|
728
736
|
* @private
|
|
729
737
|
* @type {number}
|
|
@@ -768,7 +776,7 @@ class HDate$1 {
|
|
|
768
776
|
|
|
769
777
|
|
|
770
778
|
isLeapYear() {
|
|
771
|
-
return HDate
|
|
779
|
+
return HDate.isLeapYear(this.year);
|
|
772
780
|
}
|
|
773
781
|
/**
|
|
774
782
|
* Gets the Hebrew month (1=NISAN, 7=TISHREI) of this Hebrew date
|
|
@@ -786,7 +794,7 @@ class HDate$1 {
|
|
|
786
794
|
|
|
787
795
|
|
|
788
796
|
getTishreiMonth() {
|
|
789
|
-
const nummonths = HDate
|
|
797
|
+
const nummonths = HDate.monthsInYear(this.getFullYear());
|
|
790
798
|
return (this.getMonth() + nummonths - 6) % nummonths || nummonths;
|
|
791
799
|
}
|
|
792
800
|
/**
|
|
@@ -796,7 +804,7 @@ class HDate$1 {
|
|
|
796
804
|
|
|
797
805
|
|
|
798
806
|
daysInMonth() {
|
|
799
|
-
return HDate
|
|
807
|
+
return HDate.daysInMonth(this.getMonth(), this.getFullYear());
|
|
800
808
|
}
|
|
801
809
|
/**
|
|
802
810
|
* Gets the day within the month (1-30)
|
|
@@ -839,7 +847,7 @@ class HDate$1 {
|
|
|
839
847
|
|
|
840
848
|
|
|
841
849
|
setMonth(month) {
|
|
842
|
-
this.month = HDate
|
|
850
|
+
this.month = HDate.monthNum(month);
|
|
843
851
|
fix(this);
|
|
844
852
|
return this;
|
|
845
853
|
}
|
|
@@ -875,7 +883,7 @@ class HDate$1 {
|
|
|
875
883
|
|
|
876
884
|
abs() {
|
|
877
885
|
if (typeof this.abs0 !== 'number') {
|
|
878
|
-
this.abs0 = HDate
|
|
886
|
+
this.abs0 = HDate.hebrew2abs(this.year, this.month, this.day);
|
|
879
887
|
}
|
|
880
888
|
|
|
881
889
|
return this.abs0;
|
|
@@ -895,20 +903,20 @@ class HDate$1 {
|
|
|
895
903
|
let tempabs = day;
|
|
896
904
|
|
|
897
905
|
if (month < TISHREI$2) {
|
|
898
|
-
for (let m = TISHREI$2; m <= HDate
|
|
899
|
-
tempabs += HDate
|
|
906
|
+
for (let m = TISHREI$2; m <= HDate.monthsInYear(year); m++) {
|
|
907
|
+
tempabs += HDate.daysInMonth(m, year);
|
|
900
908
|
}
|
|
901
909
|
|
|
902
910
|
for (let m = NISAN$2; m < month; m++) {
|
|
903
|
-
tempabs += HDate
|
|
911
|
+
tempabs += HDate.daysInMonth(m, year);
|
|
904
912
|
}
|
|
905
913
|
} else {
|
|
906
914
|
for (let m = TISHREI$2; m < month; m++) {
|
|
907
|
-
tempabs += HDate
|
|
915
|
+
tempabs += HDate.daysInMonth(m, year);
|
|
908
916
|
}
|
|
909
917
|
}
|
|
910
918
|
|
|
911
|
-
return EPOCH + HDate
|
|
919
|
+
return EPOCH + HDate.elapsedDays(year) + tempabs - 1;
|
|
912
920
|
}
|
|
913
921
|
/**
|
|
914
922
|
* @private
|
|
@@ -918,7 +926,7 @@ class HDate$1 {
|
|
|
918
926
|
|
|
919
927
|
|
|
920
928
|
static newYear(year) {
|
|
921
|
-
return EPOCH + HDate
|
|
929
|
+
return EPOCH + HDate.elapsedDays(year) + HDate.newYearDelay(year);
|
|
922
930
|
}
|
|
923
931
|
/**
|
|
924
932
|
* @private
|
|
@@ -928,13 +936,13 @@ class HDate$1 {
|
|
|
928
936
|
|
|
929
937
|
|
|
930
938
|
static newYearDelay(year) {
|
|
931
|
-
const ny1 = HDate
|
|
932
|
-
const ny2 = HDate
|
|
939
|
+
const ny1 = HDate.elapsedDays(year);
|
|
940
|
+
const ny2 = HDate.elapsedDays(year + 1);
|
|
933
941
|
|
|
934
942
|
if (ny2 - ny1 === 356) {
|
|
935
943
|
return 2;
|
|
936
944
|
} else {
|
|
937
|
-
const ny0 = HDate
|
|
945
|
+
const ny0 = HDate.elapsedDays(year - 1);
|
|
938
946
|
return ny1 - ny0 === 382 ? 1 : 0;
|
|
939
947
|
}
|
|
940
948
|
}
|
|
@@ -955,18 +963,18 @@ class HDate$1 {
|
|
|
955
963
|
|
|
956
964
|
let year = Math.floor((abs - EPOCH) / AVG_HEBYEAR_DAYS);
|
|
957
965
|
|
|
958
|
-
while (HDate
|
|
966
|
+
while (HDate.newYear(year) <= abs) {
|
|
959
967
|
++year;
|
|
960
968
|
}
|
|
961
969
|
|
|
962
970
|
--year;
|
|
963
|
-
let month = abs < HDate
|
|
971
|
+
let month = abs < HDate.hebrew2abs(year, 1, 1) ? 7 : 1;
|
|
964
972
|
|
|
965
|
-
while (abs > HDate
|
|
973
|
+
while (abs > HDate.hebrew2abs(year, month, HDate.daysInMonth(month, year))) {
|
|
966
974
|
++month;
|
|
967
975
|
}
|
|
968
976
|
|
|
969
|
-
const day = 1 + abs - HDate
|
|
977
|
+
const day = 1 + abs - HDate.hebrew2abs(year, month, 1);
|
|
970
978
|
return {
|
|
971
979
|
yy: year,
|
|
972
980
|
mm: month,
|
|
@@ -980,7 +988,7 @@ class HDate$1 {
|
|
|
980
988
|
|
|
981
989
|
|
|
982
990
|
getMonthName() {
|
|
983
|
-
return HDate
|
|
991
|
+
return HDate.getMonthName(this.getMonth(), this.getFullYear());
|
|
984
992
|
}
|
|
985
993
|
/**
|
|
986
994
|
* Renders this Hebrew date as a translated or transliterated string,
|
|
@@ -1002,7 +1010,7 @@ class HDate$1 {
|
|
|
1002
1010
|
const day = this.getDate();
|
|
1003
1011
|
const monthName = Locale.gettext(this.getMonthName(), locale0);
|
|
1004
1012
|
const nth = Locale.ordinal(day, locale0);
|
|
1005
|
-
const dayOf = HDate
|
|
1013
|
+
const dayOf = HDate.getDayOfTranslation(locale0);
|
|
1006
1014
|
const dateStr = `${nth}${dayOf} ${monthName}`;
|
|
1007
1015
|
|
|
1008
1016
|
if (showYear) {
|
|
@@ -1135,7 +1143,7 @@ class HDate$1 {
|
|
|
1135
1143
|
|
|
1136
1144
|
|
|
1137
1145
|
next() {
|
|
1138
|
-
return new HDate
|
|
1146
|
+
return new HDate(this.abs() + 1);
|
|
1139
1147
|
}
|
|
1140
1148
|
/**
|
|
1141
1149
|
* Returns the previous Hebrew date
|
|
@@ -1144,7 +1152,7 @@ class HDate$1 {
|
|
|
1144
1152
|
|
|
1145
1153
|
|
|
1146
1154
|
prev() {
|
|
1147
|
-
return new HDate
|
|
1155
|
+
return new HDate(this.abs() - 1);
|
|
1148
1156
|
}
|
|
1149
1157
|
/**
|
|
1150
1158
|
* Returns a cloned `HDate` object with a specified amount of time added
|
|
@@ -1168,24 +1176,24 @@ class HDate$1 {
|
|
|
1168
1176
|
number = parseInt(number, 10);
|
|
1169
1177
|
|
|
1170
1178
|
if (!number) {
|
|
1171
|
-
return new HDate
|
|
1179
|
+
return new HDate(this);
|
|
1172
1180
|
}
|
|
1173
1181
|
|
|
1174
|
-
units = HDate
|
|
1182
|
+
units = HDate.standardizeUnits(units);
|
|
1175
1183
|
|
|
1176
1184
|
if (units === UNITS_DAY) {
|
|
1177
|
-
return new HDate
|
|
1185
|
+
return new HDate(this.abs() + number);
|
|
1178
1186
|
} else if (units === UNITS_WEEK) {
|
|
1179
|
-
return new HDate
|
|
1187
|
+
return new HDate(this.abs() + 7 * number);
|
|
1180
1188
|
} else if (units === UNITS_YEAR) {
|
|
1181
|
-
return new HDate
|
|
1189
|
+
return new HDate(this.getDate(), this.getMonth(), this.getFullYear() + number);
|
|
1182
1190
|
} else if (units === UNITS_MONTH) {
|
|
1183
|
-
let hd = new HDate
|
|
1191
|
+
let hd = new HDate(this);
|
|
1184
1192
|
const sign = number > 0 ? 1 : -1;
|
|
1185
1193
|
number = Math.abs(number);
|
|
1186
1194
|
|
|
1187
1195
|
for (let i = 0; i < number; i++) {
|
|
1188
|
-
hd = new HDate
|
|
1196
|
+
hd = new HDate(hd.abs() + sign * hd.daysInMonth());
|
|
1189
1197
|
}
|
|
1190
1198
|
|
|
1191
1199
|
return hd;
|
|
@@ -1200,7 +1208,7 @@ class HDate$1 {
|
|
|
1200
1208
|
|
|
1201
1209
|
static standardizeUnits(units) {
|
|
1202
1210
|
const full = UNITS_SINGLE[units] || String(units || '').toLowerCase().replace(/s$/, '');
|
|
1203
|
-
return UNITS_VALID[full] || throwTypeError$
|
|
1211
|
+
return UNITS_VALID[full] || throwTypeError$3(`Invalid units '${units}'`);
|
|
1204
1212
|
}
|
|
1205
1213
|
/**
|
|
1206
1214
|
* Returns a cloned `HDate` object with a specified amount of time subracted
|
|
@@ -1249,7 +1257,7 @@ class HDate$1 {
|
|
|
1249
1257
|
|
|
1250
1258
|
|
|
1251
1259
|
deltaDays(other) {
|
|
1252
|
-
if (!HDate
|
|
1260
|
+
if (!HDate.isHDate(other)) {
|
|
1253
1261
|
throw new TypeError(`Bad argument: ${other}`);
|
|
1254
1262
|
}
|
|
1255
1263
|
|
|
@@ -1263,7 +1271,7 @@ class HDate$1 {
|
|
|
1263
1271
|
|
|
1264
1272
|
|
|
1265
1273
|
isSameDate(other) {
|
|
1266
|
-
if (HDate
|
|
1274
|
+
if (HDate.isHDate(other)) {
|
|
1267
1275
|
return this.year == other.year && this.month == other.month && this.day == other.day;
|
|
1268
1276
|
}
|
|
1269
1277
|
|
|
@@ -1296,7 +1304,7 @@ class HDate$1 {
|
|
|
1296
1304
|
|
|
1297
1305
|
|
|
1298
1306
|
static monthsInYear(year) {
|
|
1299
|
-
return 12 + HDate
|
|
1307
|
+
return 12 + HDate.isLeapYear(year); // boolean is cast to 1 or 0
|
|
1300
1308
|
}
|
|
1301
1309
|
/**
|
|
1302
1310
|
* Number of days in Hebrew month in a given year (29 or 30)
|
|
@@ -1307,7 +1315,7 @@ class HDate$1 {
|
|
|
1307
1315
|
|
|
1308
1316
|
|
|
1309
1317
|
static daysInMonth(month, year) {
|
|
1310
|
-
if (month == IYYAR$1 || month == TAMUZ$1 || month == ELUL$2 || month == TEVET$2 || month == ADAR_II$2 || month == ADAR_I$2 && !HDate
|
|
1318
|
+
if (month == IYYAR$1 || month == TAMUZ$1 || month == ELUL$2 || month == TEVET$2 || month == ADAR_II$2 || month == ADAR_I$2 && !HDate.isLeapYear(year) || month == CHESHVAN$2 && !HDate.longCheshvan(year) || month == KISLEV$2 && HDate.shortKislev(year)) {
|
|
1311
1319
|
return 29;
|
|
1312
1320
|
} else {
|
|
1313
1321
|
return 30;
|
|
@@ -1327,7 +1335,7 @@ class HDate$1 {
|
|
|
1327
1335
|
throw new TypeError(`bad month argument ${month}`);
|
|
1328
1336
|
}
|
|
1329
1337
|
|
|
1330
|
-
return monthNames[+HDate
|
|
1338
|
+
return monthNames[+HDate.isLeapYear(year)][month];
|
|
1331
1339
|
}
|
|
1332
1340
|
/**
|
|
1333
1341
|
* Returns the Hebrew month number (NISAN=1, TISHREI=7)
|
|
@@ -1339,7 +1347,7 @@ class HDate$1 {
|
|
|
1339
1347
|
static monthNum(month) {
|
|
1340
1348
|
return typeof month === 'number' ? month : month.charCodeAt(0) >= 48 && month.charCodeAt(0) <= 57 ?
|
|
1341
1349
|
/* number */
|
|
1342
|
-
parseInt(month, 10) : HDate
|
|
1350
|
+
parseInt(month, 10) : HDate.monthFromName(month);
|
|
1343
1351
|
}
|
|
1344
1352
|
/**
|
|
1345
1353
|
* Days from sunday prior to start of Hebrew calendar to mean
|
|
@@ -1350,7 +1358,7 @@ class HDate$1 {
|
|
|
1350
1358
|
|
|
1351
1359
|
|
|
1352
1360
|
static elapsedDays(year) {
|
|
1353
|
-
const elapsed = edCache[year] = edCache[year] || HDate
|
|
1361
|
+
const elapsed = edCache[year] = edCache[year] || HDate.elapsedDays0(year);
|
|
1354
1362
|
return elapsed;
|
|
1355
1363
|
}
|
|
1356
1364
|
/**
|
|
@@ -1372,7 +1380,7 @@ class HDate$1 {
|
|
|
1372
1380
|
const hElapsed = 5 + 12 * mElapsed + 793 * Math.floor(mElapsed / 1080) + Math.floor(pElapsed / 1080);
|
|
1373
1381
|
const parts = pElapsed % 1080 + 1080 * (hElapsed % 24);
|
|
1374
1382
|
const day = 1 + 29 * mElapsed + Math.floor(hElapsed / 24);
|
|
1375
|
-
const altDay = day + (parts >= 19440 || 2 == day % 7 && parts >= 9924 && !HDate
|
|
1383
|
+
const altDay = day + (parts >= 19440 || 2 == day % 7 && parts >= 9924 && !HDate.isLeapYear(year) || 1 == day % 7 && parts >= 16789 && HDate.isLeapYear(prevYear));
|
|
1376
1384
|
return altDay + (altDay % 7 === 0 || altDay % 7 == 3 || altDay % 7 == 5);
|
|
1377
1385
|
}
|
|
1378
1386
|
/**
|
|
@@ -1383,7 +1391,7 @@ class HDate$1 {
|
|
|
1383
1391
|
|
|
1384
1392
|
|
|
1385
1393
|
static daysInYear(year) {
|
|
1386
|
-
return HDate
|
|
1394
|
+
return HDate.elapsedDays(year + 1) - HDate.elapsedDays(year);
|
|
1387
1395
|
}
|
|
1388
1396
|
/**
|
|
1389
1397
|
* true if Cheshvan is long in Hebrew year
|
|
@@ -1393,7 +1401,7 @@ class HDate$1 {
|
|
|
1393
1401
|
|
|
1394
1402
|
|
|
1395
1403
|
static longCheshvan(year) {
|
|
1396
|
-
return HDate
|
|
1404
|
+
return HDate.daysInYear(year) % 10 == 5;
|
|
1397
1405
|
}
|
|
1398
1406
|
/**
|
|
1399
1407
|
* true if Kislev is short in Hebrew year
|
|
@@ -1403,7 +1411,7 @@ class HDate$1 {
|
|
|
1403
1411
|
|
|
1404
1412
|
|
|
1405
1413
|
static shortKislev(year) {
|
|
1406
|
-
return HDate
|
|
1414
|
+
return HDate.daysInYear(year) % 10 == 3;
|
|
1407
1415
|
}
|
|
1408
1416
|
/**
|
|
1409
1417
|
* Converts Hebrew month string name to numeric
|
|
@@ -1592,17 +1600,17 @@ function fixDate(date) {
|
|
|
1592
1600
|
date.year -= 1;
|
|
1593
1601
|
}
|
|
1594
1602
|
|
|
1595
|
-
date.day += HDate
|
|
1603
|
+
date.day += HDate.daysInMonth(date.month, date.year);
|
|
1596
1604
|
date.month -= 1;
|
|
1597
1605
|
fix(date);
|
|
1598
1606
|
}
|
|
1599
1607
|
|
|
1600
|
-
if (date.day > HDate
|
|
1608
|
+
if (date.day > HDate.daysInMonth(date.month, date.year)) {
|
|
1601
1609
|
if (date.month == ELUL$2) {
|
|
1602
1610
|
date.year += 1;
|
|
1603
1611
|
}
|
|
1604
1612
|
|
|
1605
|
-
date.day -= HDate
|
|
1613
|
+
date.day -= HDate.daysInMonth(date.month, date.year);
|
|
1606
1614
|
date.month += 1;
|
|
1607
1615
|
fix(date);
|
|
1608
1616
|
}
|
|
@@ -1621,11 +1629,11 @@ function fixMonth(date) {
|
|
|
1621
1629
|
|
|
1622
1630
|
fix(date);
|
|
1623
1631
|
} else if (date.month < 1) {
|
|
1624
|
-
date.month += HDate
|
|
1632
|
+
date.month += HDate.monthsInYear(date.year);
|
|
1625
1633
|
date.year -= 1;
|
|
1626
1634
|
fix(date);
|
|
1627
|
-
} else if (date.month > HDate
|
|
1628
|
-
date.month -= HDate
|
|
1635
|
+
} else if (date.month > HDate.monthsInYear(date.year)) {
|
|
1636
|
+
date.month -= HDate.monthsInYear(date.year);
|
|
1629
1637
|
date.year += 1;
|
|
1630
1638
|
fix(date);
|
|
1631
1639
|
}
|
|
@@ -1642,7 +1650,7 @@ function fixMonth(date) {
|
|
|
1642
1650
|
|
|
1643
1651
|
|
|
1644
1652
|
function onOrBefore(day, t, offset) {
|
|
1645
|
-
return new HDate
|
|
1653
|
+
return new HDate(HDate.dayOnOrBefore(day, t.abs() + offset));
|
|
1646
1654
|
}
|
|
1647
1655
|
|
|
1648
1656
|
const CHAG$1 = 0x000001;
|
|
@@ -1669,6 +1677,7 @@ const HEBREW_DATE = 0x040000;
|
|
|
1669
1677
|
const MINOR_HOLIDAY$2 = 0x080000;
|
|
1670
1678
|
const EREV$2 = 0x100000;
|
|
1671
1679
|
const CHOL_HAMOED$2 = 0x200000;
|
|
1680
|
+
const MISHNA_YOMI = 0x400000;
|
|
1672
1681
|
/**
|
|
1673
1682
|
* Holiday flags for Event
|
|
1674
1683
|
* @readonly
|
|
@@ -1740,7 +1749,10 @@ const flags = {
|
|
|
1740
1749
|
EREV: EREV$2,
|
|
1741
1750
|
|
|
1742
1751
|
/** Chol haMoed, intermediate days of Pesach or Sukkot */
|
|
1743
|
-
CHOL_HAMOED: CHOL_HAMOED$2
|
|
1752
|
+
CHOL_HAMOED: CHOL_HAMOED$2,
|
|
1753
|
+
|
|
1754
|
+
/** Mishna Yomi */
|
|
1755
|
+
MISHNA_YOMI
|
|
1744
1756
|
};
|
|
1745
1757
|
/** Represents an Event with a title, date, and flags */
|
|
1746
1758
|
|
|
@@ -2292,7 +2304,7 @@ function pad4(number) {
|
|
|
2292
2304
|
return String(number);
|
|
2293
2305
|
}
|
|
2294
2306
|
|
|
2295
|
-
function throwTypeError$
|
|
2307
|
+
function throwTypeError$2(error) {
|
|
2296
2308
|
throw new TypeError(error);
|
|
2297
2309
|
}
|
|
2298
2310
|
/**
|
|
@@ -2353,7 +2365,7 @@ class Zmanim {
|
|
|
2353
2365
|
throw new RangeError(`Longitude ${longitude} out of range [-180,180]`);
|
|
2354
2366
|
}
|
|
2355
2367
|
|
|
2356
|
-
const dt = greg.isDate(date) ? date : HDate
|
|
2368
|
+
const dt = greg.isDate(date) ? date : HDate.isHDate(date) ? date.greg() : throwTypeError$2(`invalid date: ${date}`);
|
|
2357
2369
|
this.date = dt;
|
|
2358
2370
|
this.sun = new Sun_1(this.date, latitude, longitude);
|
|
2359
2371
|
this.latitude = latitude;
|
|
@@ -3273,7 +3285,7 @@ class Molad {
|
|
|
3273
3285
|
let m_adj = month - 7;
|
|
3274
3286
|
|
|
3275
3287
|
if (m_adj < 0) {
|
|
3276
|
-
m_adj += HDate
|
|
3288
|
+
m_adj += HDate.monthsInYear(year);
|
|
3277
3289
|
}
|
|
3278
3290
|
|
|
3279
3291
|
const m_elapsed = 235 * Math.floor((year - 1) / 19) + // Months in complete 19 year lunar (Metonic) cycles so far
|
|
@@ -3316,7 +3328,7 @@ class Molad {
|
|
|
3316
3328
|
|
|
3317
3329
|
|
|
3318
3330
|
getMonthName() {
|
|
3319
|
-
return HDate
|
|
3331
|
+
return HDate.getMonthName(this.month, this.year);
|
|
3320
3332
|
}
|
|
3321
3333
|
/**
|
|
3322
3334
|
* @return {number} Day of Week (0=Sunday, 6=Saturday)
|
|
@@ -3497,18 +3509,23 @@ const shas = [['Berachot', 64], ['Shabbat', 157], ['Eruvin', 105], ['Pesachim',
|
|
|
3497
3509
|
name: m[0],
|
|
3498
3510
|
blatt: m[1]
|
|
3499
3511
|
};
|
|
3500
|
-
});
|
|
3512
|
+
}); // eslint-disable-next-line require-jsdoc
|
|
3513
|
+
|
|
3514
|
+
function throwTypeError$1(msg) {
|
|
3515
|
+
throw new TypeError(msg);
|
|
3516
|
+
}
|
|
3501
3517
|
/**
|
|
3502
3518
|
* Returns the Daf Yomi for given date
|
|
3503
3519
|
*/
|
|
3504
3520
|
|
|
3521
|
+
|
|
3505
3522
|
class DafYomi {
|
|
3506
3523
|
/**
|
|
3507
3524
|
* Initializes a daf yomi instance
|
|
3508
|
-
* @param {Date} gregdate Gregorian date
|
|
3525
|
+
* @param {Date|HDate|number} gregdate Gregorian date
|
|
3509
3526
|
*/
|
|
3510
3527
|
constructor(gregdate) {
|
|
3511
|
-
const cday = typeof gregdate === 'number' && !isNaN(gregdate) ? gregdate : greg.isDate(gregdate) ? greg.greg2abs(gregdate) : HDate.isHDate(gregdate) ? gregdate.abs() : throwTypeError(`non-date given to dafyomi: ${gregdate}`);
|
|
3528
|
+
const cday = typeof gregdate === 'number' && !isNaN(gregdate) ? gregdate : greg.isDate(gregdate) ? greg.greg2abs(gregdate) : HDate.isHDate(gregdate) ? gregdate.abs() : throwTypeError$1(`non-date given to dafyomi: ${gregdate}`);
|
|
3512
3529
|
|
|
3513
3530
|
if (cday < osday) {
|
|
3514
3531
|
throw new RangeError(`Date ${gregdate} too early; Daf Yomi cycle began on ${osdate}`);
|
|
@@ -3700,16 +3717,16 @@ class Sedra {
|
|
|
3700
3717
|
constructor(hebYr, il) {
|
|
3701
3718
|
// the Hebrew year
|
|
3702
3719
|
hebYr = +hebYr;
|
|
3703
|
-
const longC = HDate
|
|
3704
|
-
const shortK = HDate
|
|
3720
|
+
const longC = HDate.longCheshvan(hebYr);
|
|
3721
|
+
const shortK = HDate.shortKislev(hebYr);
|
|
3705
3722
|
const type = this.type = longC && !shortK ? COMPLETE : !longC && shortK ? INCOMPLETE : REGULAR;
|
|
3706
3723
|
this.year = hebYr;
|
|
3707
|
-
const rh0 = new HDate
|
|
3724
|
+
const rh0 = new HDate(1, months.TISHREI, hebYr);
|
|
3708
3725
|
const rh = rh0.abs();
|
|
3709
3726
|
const rhDay = this.roshHashanaDay = rh0.getDay() + 1; // find the first Saturday on or after Rosh Hashana
|
|
3710
3727
|
|
|
3711
|
-
this.firstSaturday = HDate
|
|
3712
|
-
const leap = this.leap = +HDate
|
|
3728
|
+
this.firstSaturday = HDate.dayOnOrBefore(6, rh + 6);
|
|
3729
|
+
const leap = this.leap = +HDate.isLeapYear(hebYr);
|
|
3713
3730
|
this.il = Boolean(il);
|
|
3714
3731
|
const key = `${leap}${rhDay}${type}`;
|
|
3715
3732
|
|
|
@@ -3786,7 +3803,7 @@ class Sedra {
|
|
|
3786
3803
|
return null; // doesn't occur this year
|
|
3787
3804
|
}
|
|
3788
3805
|
|
|
3789
|
-
return new HDate
|
|
3806
|
+
return new HDate(this.firstSaturday + idx * 7);
|
|
3790
3807
|
} else if (typeof parsha === 'string') {
|
|
3791
3808
|
const num = parsha2id[parsha];
|
|
3792
3809
|
|
|
@@ -3802,7 +3819,7 @@ class Sedra {
|
|
|
3802
3819
|
return null; // doesn't occur this year
|
|
3803
3820
|
}
|
|
3804
3821
|
|
|
3805
|
-
return new HDate
|
|
3822
|
+
return new HDate(this.firstSaturday + idx * 7);
|
|
3806
3823
|
}
|
|
3807
3824
|
} else if (Array.isArray(parsha) && parsha.length === 1 && typeof parsha[0] === 'string') {
|
|
3808
3825
|
return this.find(parsha[0]);
|
|
@@ -3853,9 +3870,9 @@ class Sedra {
|
|
|
3853
3870
|
|
|
3854
3871
|
|
|
3855
3872
|
lookup(hDate) {
|
|
3856
|
-
const absDate = typeof hDate === 'number' ? hDate : HDate
|
|
3873
|
+
const absDate = typeof hDate === 'number' ? hDate : HDate.isHDate(hDate) ? hDate.abs() : throwError(`Bad date argument: ${hDate}`); // find the first saturday on or after today's date
|
|
3857
3874
|
|
|
3858
|
-
const saturday = HDate
|
|
3875
|
+
const saturday = HDate.dayOnOrBefore(6, absDate + 6);
|
|
3859
3876
|
const weekNum = (saturday - this.firstSaturday) / 7;
|
|
3860
3877
|
const index = this.theSedraArray[weekNum];
|
|
3861
3878
|
|
|
@@ -4311,7 +4328,7 @@ class MevarchimChodeshEvent extends Event {
|
|
|
4311
4328
|
this.monthName = monthName;
|
|
4312
4329
|
const hyear = date.getFullYear();
|
|
4313
4330
|
const hmonth = date.getMonth();
|
|
4314
|
-
const monNext = hmonth == HDate
|
|
4331
|
+
const monNext = hmonth == HDate.monthsInYear(hyear) ? months.NISAN : hmonth + 1;
|
|
4315
4332
|
const molad = new MoladEvent(date, hyear, monNext);
|
|
4316
4333
|
this.memo = molad.render();
|
|
4317
4334
|
}
|
|
@@ -4475,8 +4492,8 @@ function getHolidaysForYear(year) {
|
|
|
4475
4492
|
return cached;
|
|
4476
4493
|
}
|
|
4477
4494
|
|
|
4478
|
-
const RH = new HDate
|
|
4479
|
-
const pesach = new HDate
|
|
4495
|
+
const RH = new HDate(1, TISHREI$1, year);
|
|
4496
|
+
const pesach = new HDate(15, NISAN$1, year);
|
|
4480
4497
|
const h = new SimpleMap(); // eslint-disable-next-line require-jsdoc
|
|
4481
4498
|
|
|
4482
4499
|
function add(...events) {
|
|
@@ -4500,7 +4517,7 @@ function getHolidaysForYear(year) {
|
|
|
4500
4517
|
|
|
4501
4518
|
function addEvents(year, arr) {
|
|
4502
4519
|
arr.forEach(a => {
|
|
4503
|
-
add(new HolidayEvent(new HDate
|
|
4520
|
+
add(new HolidayEvent(new HDate(a[0], a[1], year), a[2], a[3], a[4]));
|
|
4504
4521
|
});
|
|
4505
4522
|
} // standard holidays that don't shift based on year
|
|
4506
4523
|
|
|
@@ -4512,7 +4529,7 @@ function getHolidaysForYear(year) {
|
|
|
4512
4529
|
emoji: '📖✍️'
|
|
4513
4530
|
}]]); // first SAT after RH
|
|
4514
4531
|
|
|
4515
|
-
add(new HolidayEvent(new HDate
|
|
4532
|
+
add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, 7 + RH.abs())), 'Shabbat Shuva', SPECIAL_SHABBAT$1));
|
|
4516
4533
|
addEvents(year, [[10, TISHREI$1, 'Yom Kippur', CHAG | YOM_TOV_ENDS$1 | MAJOR_FAST$1, {
|
|
4517
4534
|
emoji: '📖✍️'
|
|
4518
4535
|
}], [14, TISHREI$1, 'Erev Sukkot', EREV$1 | LIGHT_CANDLES$1], // Attributes for Israel and Diaspora are different
|
|
@@ -4538,37 +4555,37 @@ function getHolidaysForYear(year) {
|
|
|
4538
4555
|
cholHaMoedDay: -1
|
|
4539
4556
|
}], [22, TISHREI$1, 'Shmini Atzeret', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1], // [22, TISHREI, "Shmini Atzeret / Simchat Torah", YOM_TOV_ENDS | IL_ONLY],
|
|
4540
4557
|
[22, TISHREI$1, 'Shmini Atzeret', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1], [23, TISHREI$1, 'Simchat Torah', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1]]);
|
|
4541
|
-
add(new HolidayEvent(new HDate
|
|
4558
|
+
add(new HolidayEvent(new HDate(24, KISLEV$1, year), 'Chanukah: 1 Candle', EREV$1 | MINOR_HOLIDAY$1 | CHANUKAH_CANDLES$1, {
|
|
4542
4559
|
emoji: chanukahEmoji + KEYCAP_DIGITS[1]
|
|
4543
4560
|
})); // yes, we know Kislev 30-32 are wrong
|
|
4544
4561
|
// HDate() corrects the month automatically
|
|
4545
4562
|
|
|
4546
4563
|
for (let candles = 2; candles <= 8; candles++) {
|
|
4547
|
-
const hd = new HDate
|
|
4564
|
+
const hd = new HDate(23 + candles, KISLEV$1, year);
|
|
4548
4565
|
add(new HolidayEvent(hd, `Chanukah: ${candles} Candles`, MINOR_HOLIDAY$1 | CHANUKAH_CANDLES$1, {
|
|
4549
4566
|
chanukahDay: candles - 1,
|
|
4550
4567
|
emoji: chanukahEmoji + KEYCAP_DIGITS[candles]
|
|
4551
4568
|
}));
|
|
4552
4569
|
}
|
|
4553
4570
|
|
|
4554
|
-
add(new HolidayEvent(new HDate
|
|
4571
|
+
add(new HolidayEvent(new HDate(32, KISLEV$1, year), 'Chanukah: 8th Day', MINOR_HOLIDAY$1, {
|
|
4555
4572
|
chanukahDay: 8,
|
|
4556
4573
|
emoji: chanukahEmoji
|
|
4557
4574
|
}));
|
|
4558
|
-
add(new AsaraBTevetEvent(new HDate
|
|
4575
|
+
add(new AsaraBTevetEvent(new HDate(10, TEVET$1, year), 'Asara B\'Tevet', MINOR_FAST$1), new HolidayEvent(new HDate(15, SHVAT$1, year), 'Tu BiShvat', MINOR_HOLIDAY$1, {
|
|
4559
4576
|
emoji: '🌳'
|
|
4560
4577
|
}));
|
|
4561
4578
|
const pesachAbs = pesach.abs();
|
|
4562
|
-
add(new HolidayEvent(new HDate
|
|
4579
|
+
add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 43)), 'Shabbat Shekalim', SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 30)), 'Shabbat Zachor', SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(pesachAbs - (pesach.getDay() == TUE ? 33 : 31)), 'Ta\'anit Esther', MINOR_FAST$1));
|
|
4563
4580
|
addEvents(year, [[13, ADAR_II$1, 'Erev Purim', EREV$1 | MINOR_HOLIDAY$1, {
|
|
4564
4581
|
emoji: '🎭️📜'
|
|
4565
4582
|
}], [14, ADAR_II$1, 'Purim', MINOR_HOLIDAY$1, {
|
|
4566
4583
|
emoji: '🎭️📜'
|
|
4567
4584
|
}]]);
|
|
4568
|
-
add(new HolidayEvent(new HDate
|
|
4585
|
+
add(new HolidayEvent(new HDate(pesachAbs - (pesach.getDay() == SUN ? 28 : 29)), 'Shushan Purim', MINOR_HOLIDAY$1, {
|
|
4569
4586
|
emoji: '🎭️📜'
|
|
4570
|
-
}), new HolidayEvent(new HDate
|
|
4571
|
-
pesach.prev().getDay() == SAT$1 ? pesach.onOrBefore(THU) : new HDate
|
|
4587
|
+
}), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 14) - 7), 'Shabbat Parah', SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 14)), 'Shabbat HaChodesh', SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 1)), 'Shabbat HaGadol', SPECIAL_SHABBAT$1), new HolidayEvent( // if the fast falls on Shabbat, move to Thursday
|
|
4588
|
+
pesach.prev().getDay() == SAT$1 ? pesach.onOrBefore(THU) : new HDate(14, NISAN$1, year), 'Ta\'anit Bechorot', MINOR_FAST$1));
|
|
4572
4589
|
addEvents(year, [[14, NISAN$1, 'Erev Pesach', EREV$1 | LIGHT_CANDLES$1], // Attributes for Israel and Diaspora are different
|
|
4573
4590
|
[15, NISAN$1, 'Pesach I', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1], [16, NISAN$1, 'Pesach II (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4574
4591
|
cholHaMoedDay: 1
|
|
@@ -4603,22 +4620,22 @@ function getHolidaysForYear(year) {
|
|
|
4603
4620
|
}], [1, ELUL$1, 'Rosh Hashana LaBehemot', MINOR_HOLIDAY$1, {
|
|
4604
4621
|
emoji: '🐑'
|
|
4605
4622
|
}]]);
|
|
4606
|
-
add(new HolidayEvent(new HDate
|
|
4623
|
+
add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, new HDate(1, TISHREI$1, year + 1).abs() - 4)), 'Leil Selichot', MINOR_HOLIDAY$1, {
|
|
4607
4624
|
emoji: '🕍'
|
|
4608
4625
|
}));
|
|
4609
|
-
add(new HolidayEvent(new HDate
|
|
4626
|
+
add(new HolidayEvent(new HDate(29, ELUL$1, year), 'Erev Rosh Hashana', EREV$1 | LIGHT_CANDLES$1, {
|
|
4610
4627
|
emoji: '🍏🍯'
|
|
4611
4628
|
}));
|
|
4612
4629
|
|
|
4613
|
-
if (HDate
|
|
4614
|
-
add(new HolidayEvent(new HDate
|
|
4630
|
+
if (HDate.isLeapYear(year)) {
|
|
4631
|
+
add(new HolidayEvent(new HDate(14, ADAR_I$1, year), 'Purim Katan', MINOR_HOLIDAY$1, {
|
|
4615
4632
|
emoji: '🎭️'
|
|
4616
4633
|
}));
|
|
4617
4634
|
}
|
|
4618
4635
|
|
|
4619
4636
|
if (year >= 5711) {
|
|
4620
4637
|
// Yom HaShoah first observed in 1951
|
|
4621
|
-
let nisan27dt = new HDate
|
|
4638
|
+
let nisan27dt = new HDate(27, NISAN$1, year);
|
|
4622
4639
|
/* When the actual date of Yom Hashoah falls on a Friday, the
|
|
4623
4640
|
* state of Israel observes Yom Hashoah on the preceding
|
|
4624
4641
|
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
@@ -4627,9 +4644,9 @@ function getHolidaysForYear(year) {
|
|
|
4627
4644
|
*/
|
|
4628
4645
|
|
|
4629
4646
|
if (nisan27dt.getDay() == FRI$1) {
|
|
4630
|
-
nisan27dt = new HDate
|
|
4647
|
+
nisan27dt = new HDate(26, NISAN$1, year);
|
|
4631
4648
|
} else if (nisan27dt.getDay() == SUN) {
|
|
4632
|
-
nisan27dt = new HDate
|
|
4649
|
+
nisan27dt = new HDate(28, NISAN$1, year);
|
|
4633
4650
|
}
|
|
4634
4651
|
|
|
4635
4652
|
add(new HolidayEvent(nisan27dt, 'Yom HaShoah', MODERN_HOLIDAY$1));
|
|
@@ -4651,34 +4668,34 @@ function getHolidaysForYear(year) {
|
|
|
4651
4668
|
day = 4;
|
|
4652
4669
|
}
|
|
4653
4670
|
|
|
4654
|
-
add(new HolidayEvent(new HDate
|
|
4671
|
+
add(new HolidayEvent(new HDate(day, IYYAR, year), 'Yom HaZikaron', MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(new HDate(day + 1, IYYAR, year), 'Yom HaAtzma\'ut', MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
4655
4672
|
}
|
|
4656
4673
|
|
|
4657
4674
|
if (year >= 5727) {
|
|
4658
4675
|
// Yom Yerushalayim only celebrated after 1967
|
|
4659
|
-
add(new HolidayEvent(new HDate
|
|
4676
|
+
add(new HolidayEvent(new HDate(28, IYYAR, year), 'Yom Yerushalayim', MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
4660
4677
|
}
|
|
4661
4678
|
|
|
4662
4679
|
if (year >= 5769) {
|
|
4663
|
-
add(new HolidayEvent(new HDate
|
|
4680
|
+
add(new HolidayEvent(new HDate(29, CHESHVAN$1, year), 'Sigd', MODERN_HOLIDAY$1));
|
|
4664
4681
|
}
|
|
4665
4682
|
|
|
4666
4683
|
if (year >= 5777) {
|
|
4667
|
-
add(new HolidayEvent(new HDate
|
|
4684
|
+
add(new HolidayEvent(new HDate(7, CHESHVAN$1, year), 'Yom HaAliyah School Observance', MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(new HDate(10, NISAN$1, year), 'Yom HaAliyah', MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
4668
4685
|
}
|
|
4669
4686
|
|
|
4670
|
-
let tamuz17 = new HDate
|
|
4687
|
+
let tamuz17 = new HDate(17, TAMUZ, year);
|
|
4671
4688
|
let tamuz17attrs;
|
|
4672
4689
|
|
|
4673
4690
|
if (tamuz17.getDay() == SAT$1) {
|
|
4674
|
-
tamuz17 = new HDate
|
|
4691
|
+
tamuz17 = new HDate(18, TAMUZ, year);
|
|
4675
4692
|
tamuz17attrs = {
|
|
4676
4693
|
observed: true
|
|
4677
4694
|
};
|
|
4678
4695
|
}
|
|
4679
4696
|
|
|
4680
4697
|
add(new HolidayEvent(tamuz17, 'Tzom Tammuz', MINOR_FAST$1, tamuz17attrs));
|
|
4681
|
-
let av9dt = new HDate
|
|
4698
|
+
let av9dt = new HDate(9, AV, year);
|
|
4682
4699
|
let av9title = 'Tish\'a B\'Av';
|
|
4683
4700
|
let av9attrs;
|
|
4684
4701
|
|
|
@@ -4691,17 +4708,17 @@ function getHolidaysForYear(year) {
|
|
|
4691
4708
|
}
|
|
4692
4709
|
|
|
4693
4710
|
const av9abs = av9dt.abs();
|
|
4694
|
-
add(new HolidayEvent(new HDate
|
|
4695
|
-
const monthsInYear = HDate
|
|
4711
|
+
add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, av9abs)), 'Shabbat Chazon', SPECIAL_SHABBAT$1), new HolidayEvent(av9dt.prev(), 'Erev Tish\'a B\'Av', EREV$1 | MAJOR_FAST$1, av9attrs), new HolidayEvent(av9dt, av9title, MAJOR_FAST$1, av9attrs), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, av9abs + 7)), 'Shabbat Nachamu', SPECIAL_SHABBAT$1));
|
|
4712
|
+
const monthsInYear = HDate.monthsInYear(year);
|
|
4696
4713
|
|
|
4697
4714
|
for (let month = 1; month <= monthsInYear; month++) {
|
|
4698
|
-
const monthName = HDate
|
|
4715
|
+
const monthName = HDate.getMonthName(month, year);
|
|
4699
4716
|
|
|
4700
|
-
if ((month == NISAN$1 ? HDate
|
|
4701
|
-
add(new RoshChodeshEvent(new HDate
|
|
4702
|
-
add(new RoshChodeshEvent(new HDate
|
|
4717
|
+
if ((month == NISAN$1 ? HDate.daysInMonth(HDate.monthsInYear(year - 1), year - 1) : HDate.daysInMonth(month - 1, year)) == 30) {
|
|
4718
|
+
add(new RoshChodeshEvent(new HDate(1, month, year), monthName));
|
|
4719
|
+
add(new RoshChodeshEvent(new HDate(30, month - 1, year), monthName));
|
|
4703
4720
|
} else if (month !== TISHREI$1) {
|
|
4704
|
-
add(new RoshChodeshEvent(new HDate
|
|
4721
|
+
add(new RoshChodeshEvent(new HDate(1, month, year), monthName));
|
|
4705
4722
|
}
|
|
4706
4723
|
|
|
4707
4724
|
if (month == ELUL$1) {
|
|
@@ -4709,8 +4726,8 @@ function getHolidaysForYear(year) {
|
|
|
4709
4726
|
} // Don't worry about month overrun; will get "Nisan" for month=14
|
|
4710
4727
|
|
|
4711
4728
|
|
|
4712
|
-
const nextMonthName = HDate
|
|
4713
|
-
add(new MevarchimChodeshEvent(new HDate
|
|
4729
|
+
const nextMonthName = HDate.getMonthName(month + 1, year);
|
|
4730
|
+
add(new MevarchimChodeshEvent(new HDate(29, month, year).onOrBefore(SAT$1), nextMonthName));
|
|
4714
4731
|
}
|
|
4715
4732
|
|
|
4716
4733
|
const sedra = getSedra(year, false);
|
|
@@ -4720,14 +4737,14 @@ function getHolidaysForYear(year) {
|
|
|
4720
4737
|
return h;
|
|
4721
4738
|
}
|
|
4722
4739
|
|
|
4723
|
-
var version="3.
|
|
4740
|
+
var version="3.33.0";
|
|
4724
4741
|
|
|
4725
|
-
var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);",language:"en_CA@ashkenazi"};var contexts$1={"":{Berachot:["Berachos"],Shabbat:["Shabbos"],Taanit:["Taanis"],Yevamot:["Yevamos"],Ketubot:["Kesubos"],"Baba Batra":["Baba Basra"],Makkot:["Makkos"],Shevuot:["Shevuos"],Horayot:["Horayos"],Menachot:["Menachos"],Bechorot:["Bechoros"],Keritot:["Kerisos"],Midot:["Midos"],"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"],"Purim Katan":["Purim Koton"],Tazria:["Sazria"],"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)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"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"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
|
|
4742
|
+
var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);",language:"en_CA@ashkenazi"};var contexts$1={"":{Berachot:["Berachos"],Shabbat:["Shabbos"],Taanit:["Taanis"],Yevamot:["Yevamos"],Ketubot:["Kesubos"],"Baba Batra":["Baba Basra"],Makkot:["Makkos"],Shevuot:["Shevuos"],Horayot:["Horayos"],Menachot:["Menachos"],Bechorot:["Bechoros"],Keritot:["Kerisos"],Midot:["Midos"],"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"],"Purim Katan":["Purim Koton"],Tazria:["Sazria"],"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)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"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"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"],Berakhot:["Berakhos"],Sheviit:["Sheviis"],Terumot:["Terumos"],Maasrot:["Maasros"],Eduyot:["Eduyos"],Avot:["Avos"],Bekhorot:["Bekhoros"],Middot:["Middos"],Oholot:["Oholos"],Tahorot:["Tahoros"],Mikvaot:["Mikvaos"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
|
|
4726
4743
|
|
|
4727
4744
|
Locale.addLocale('ashkenazi', poAshkenazi);
|
|
4728
4745
|
Locale.addLocale('a', poAshkenazi);
|
|
4729
4746
|
|
|
4730
|
-
var headers={"plural-forms":"nplurals=2; plural=(n > 1);",language:"he_IL"};var contexts={"":{Berachot:["ברכות"],Shabbat:["שַׁבָּת"],Eruvin:["עירובין"],Pesachim:["פסחים"],Shekalim:["שקלים"],Yoma:["יומא"],Sukkah:["סוכה"],Beitzah:["ביצה"],Taanit:["תענית"],Megillah:["מגילה"],"Moed Katan":["מועד קטן"],Chagigah:["חגיגה"],Yevamot:["יבמות"],Ketubot:["כתובות"],Nedarim:["נדרים"],Nazir:["נזיר"],Sotah:["סוטה"],Gitin:["גיטין"],Kiddushin:["קידושין"],"Baba Kamma":["בבא קמא"],"Baba Metzia":["בבא מציעא"],"Baba Batra":["בבא בתרא"],Sanhedrin:["סנהדרין"],Makkot:["מכות"],Shevuot:["שבועות"],"Avodah Zarah":["עבודה זרה"],Horayot:["הוריות"],Zevachim:["זבחים"],Menachot:["מנחות"],Chullin:["חולין"],Bechorot:["בכורות"],Arachin:["ערכין"],Temurah:["תמורה"],Keritot:["כריתות"],Meilah:["מעילה"],Kinnim:["קינים"],Tamid:["תמיד"],Midot:["מדות"],Niddah:["נדה"],"Daf Yomi: %s %d":["דף יומי: %s %d"],"Daf Yomi":["דף יומי"],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":["פֶּסַח ח׳"],Purim:["פּוּרִים"],"Purim Katan":["פּוּרִים קָטָן"],"Rosh Chodesh %s":["רֹאשׁ חוֹדֶשׁ %s"],"Rosh Chodesh":["רֹאשׁ חוֹדֶשׁ"],Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"],"Rosh Hashana":["רֹאשׁ הַשָּׁנָה"],"Rosh Hashana I":["רֹאשׁ הַשָּׁנָה א׳"],"Rosh Hashana II":["רֹאשׁ הַשָּׁנָה ב׳"],"Shabbat Chazon":["שַׁבָּת חֲזוֹן"],"Shabbat HaChodesh":["שַׁבָּת הַחֹדֶשׁ"],"Shabbat HaGadol":["שַׁבָּת הַגָּדוֹל"],"Shabbat Machar Chodesh":["שַׁבָּת מָחָר חוֹדֶשׁ"],"Shabbat Nachamu":["שַׁבָּת נַחֲמוּ"],"Shabbat Parah":["שַׁבָּת פּרה"],"Shabbat Rosh Chodesh":["שַׁבָּת רֹאשׁ חוֹדֶשׁ"],"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)":["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],"Ta'anit Bechorot":["תַּעֲנִית בְּכוֹרוֹת"],"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":["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"],"Pesach I (on Shabbat)":["פֶּסַח יוֹם א׳ (בְּשַׁבָּת)"],"Pesach Chol ha-Moed Day 1":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם א׳"],"Pesach Chol ha-Moed Day 2":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ב׳"],"Pesach Chol ha-Moed Day 3":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ג׳"],"Pesach Chol ha-Moed Day 4":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ד׳"],"Pesach Chol ha-Moed Day 5":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ה׳"],"Pesach Shabbat Chol ha-Moed":["פֶּסַח שַׁבָּת חוֹל הַמּוֹעֵד"],"Shavuot II (on Shabbat)":["שָׁבוּעוֹת יוֹם ב׳ (בְּשַׁבָּת)"],"Rosh Hashana I (on Shabbat)":["רֹאשׁ הַשָּׁנָה יוֹם א׳ (בְּשַׁבָּת)"],"Yom Kippur (on Shabbat)":["יוֹם כִּפּוּר (בְּשַׁבָּת)"],"Yom Kippur (Mincha, Traditional)":["יוֹם כִּפּוּר מנחה"],"Yom Kippur (Mincha, Alternate)":["יוֹם כִּפּוּר מנחה"],"Sukkot I (on Shabbat)":["סוּכּוֹת יוֹם א׳ (בְּשַׁבָּת)"],"Sukkot Chol ha-Moed Day 1":["סוּכּוֹת
|
|
4747
|
+
var headers={"plural-forms":"nplurals=2; plural=(n > 1);",language:"he_IL"};var contexts={"":{Berachot:["ברכות"],Shabbat:["שַׁבָּת"],Eruvin:["עירובין"],Pesachim:["פסחים"],Shekalim:["שקלים"],Yoma:["יומא"],Sukkah:["סוכה"],Beitzah:["ביצה"],Taanit:["תענית"],Megillah:["מגילה"],"Moed Katan":["מועד קטן"],Chagigah:["חגיגה"],Yevamot:["יבמות"],Ketubot:["כתובות"],Nedarim:["נדרים"],Nazir:["נזיר"],Sotah:["סוטה"],Gitin:["גיטין"],Kiddushin:["קידושין"],"Baba Kamma":["בבא קמא"],"Baba Metzia":["בבא מציעא"],"Baba Batra":["בבא בתרא"],Sanhedrin:["סנהדרין"],Makkot:["מכות"],Shevuot:["שבועות"],"Avodah Zarah":["עבודה זרה"],Horayot:["הוריות"],Zevachim:["זבחים"],Menachot:["מנחות"],Chullin:["חולין"],Bechorot:["בכורות"],Arachin:["ערכין"],Temurah:["תמורה"],Keritot:["כריתות"],Meilah:["מעילה"],Kinnim:["קינים"],Tamid:["תמיד"],Midot:["מדות"],Niddah:["נדה"],"Daf Yomi: %s %d":["דף יומי: %s %d"],"Daf Yomi":["דף יומי"],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":["פֶּסַח ח׳"],Purim:["פּוּרִים"],"Purim Katan":["פּוּרִים קָטָן"],"Rosh Chodesh %s":["רֹאשׁ חוֹדֶשׁ %s"],"Rosh Chodesh":["רֹאשׁ חוֹדֶשׁ"],Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"],"Rosh Hashana":["רֹאשׁ הַשָּׁנָה"],"Rosh Hashana I":["רֹאשׁ הַשָּׁנָה א׳"],"Rosh Hashana II":["רֹאשׁ הַשָּׁנָה ב׳"],"Shabbat Chazon":["שַׁבָּת חֲזוֹן"],"Shabbat HaChodesh":["שַׁבָּת הַחֹדֶשׁ"],"Shabbat HaGadol":["שַׁבָּת הַגָּדוֹל"],"Shabbat Machar Chodesh":["שַׁבָּת מָחָר חוֹדֶשׁ"],"Shabbat Nachamu":["שַׁבָּת נַחֲמוּ"],"Shabbat Parah":["שַׁבָּת פּרה"],"Shabbat Rosh Chodesh":["שַׁבָּת רֹאשׁ חוֹדֶשׁ"],"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)":["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],"Ta'anit Bechorot":["תַּעֲנִית בְּכוֹרוֹת"],"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":["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"],"Pesach I (on Shabbat)":["פֶּסַח יוֹם א׳ (בְּשַׁבָּת)"],"Pesach Chol ha-Moed Day 1":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם א׳"],"Pesach Chol ha-Moed Day 2":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ב׳"],"Pesach Chol ha-Moed Day 3":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ג׳"],"Pesach Chol ha-Moed Day 4":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ד׳"],"Pesach Chol ha-Moed Day 5":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ה׳"],"Pesach Shabbat Chol ha-Moed":["פֶּסַח שַׁבָּת חוֹל הַמּוֹעֵד"],"Shavuot II (on Shabbat)":["שָׁבוּעוֹת יוֹם ב׳ (בְּשַׁבָּת)"],"Rosh Hashana I (on Shabbat)":["רֹאשׁ הַשָּׁנָה יוֹם א׳ (בְּשַׁבָּת)"],"Yom Kippur (on Shabbat)":["יוֹם כִּפּוּר (בְּשַׁבָּת)"],"Yom Kippur (Mincha, Traditional)":["יוֹם כִּפּוּר מנחה"],"Yom Kippur (Mincha, Alternate)":["יוֹם כִּפּוּר מנחה"],"Sukkot I (on Shabbat)":["סוּכּוֹת יוֹם א׳ (בְּשַׁבָּת)"],"Sukkot Chol ha-Moed Day 1":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם א׳"],"Sukkot Chol ha-Moed Day 2":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ב׳"],"Sukkot Chol ha-Moed Day 3":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ג׳"],"Sukkot Chol ha-Moed Day 4":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ד׳"],"Sukkot Shabbat Chol ha-Moed":["סוּכּוֹת שַׁבָּת חוֹל הַמּוֹעֵד"],"Sukkot Final Day (Hoshana Raba)":["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],"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 Tevet":["רֹאשׁ חוֹדֶשׁ טֵבֵת"],min:["דקות"],"Fast begins":["תחילת הַצוֹם"],"Fast ends":["סִיּוּם הַצוֹם"],"Rosh Hashana LaBehemot":["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"],"Tish'a B'Av (observed)":["תִּשְׁעָה בְּאָב נִדחֶה"],"Shabbat Mevarchim Chodesh":["שַׁבָּת מברכים חוֹדֶשׁ"],"Shabbat Shirah":["שַׁבָּת שִׁירָה"],chatzotNight:["חֲצוֹת הַלַיְלָה"],alotHaShachar:["עֲלוֹת הַשַּׁחַר"],misheyakir:["משיכיר - זמן ציצית ותפילין"],misheyakirMachmir:["משיכיר - זמן ציצית ותפילין"],neitzHaChama:["הַנֵץ הַחַמָּה"],sofZmanShma:["סוֹף זְמַן קְרִיאַת שְׁמַע גר״א"],sofZmanTfilla:["סוֹף זְמַן תְּפִלָּה גר״א"],chatzot:["חֲצוֹת הַיּוֹם"],minchaGedola:["מִנְחָה גְּדוֹלָה"],minchaKetana:["מִנְחָה קְטַנָּה"],plagHaMincha:["פְּלַג הַמִּנְחָה"],shkiah:["שְׁקִיעָה"],"Nightfall - End of ordained fasts":["לַיְלָה - גמר תעניות דרבנן"],tzeit:["צֵאת כוכבים"],Lovingkindness:["חֶֽסֶד"],Might:["גְבוּרָה"],Beauty:["תִּפאֶרֶת"],Eternity:["נֶּֽצַח"],Splendor:["הוֹד"],Foundation:["יְּסוֹד"],Majesty:["מַּלְכוּת"],day:["יוֹם"],"Chanukah Day 1":["חֲנוּכָּה יוֹם א׳"],"Chanukah Day 2":["חֲנוּכָּה יוֹם ב׳"],"Chanukah Day 3":["חֲנוּכָּה יוֹם ג׳"],"Chanukah Day 4":["חֲנוּכָּה יוֹם ד׳"],"Chanukah Day 5":["חֲנוּכָּה יוֹם ה׳"],"Chanukah Day 6":["חֲנוּכָּה יוֹם ו׳"],"Chanukah Day 7":["חֲנוּכָּה יוֹם ז׳"],"Chanukah Day 7 (on Rosh Chodesh)":["חֲנוּכָּה יוֹם ז׳ (רֹאשׁ חוֹדֶשׁ)"],"Chanukah Day 8":["חֲנוּכָּה יוֹם ח׳"],Berakhot:["ברכות"],Peah:["פאה"],Demai:["דמאי"],Kilayim:["כלאים"],Sheviit:["שביעית"],Terumot:["תרומות"],Maasrot:["מעשרות"],"Maaser Sheni":["מעשר שני"],Challah:["חלה"],Orlah:["ערלה"],Bikkurim:["ביכורים"],"Rosh Hashanah":["ראש השנה"],Gittin:["גיטין"],"Bava Kamma":["בבא קמא"],"Bava Metzia":["בבא מציעא"],"Bava Batra":["בבא בתרא"],Eduyot:["עדיות"],Avot:["אבות"],Bekhorot:["בכורות"],Arakhin:["ערכין"],Middot:["מדות"],Kelim:["כלים"],Oholot:["אהלות"],Negaim:["נגעים"],Parah:["פרה"],Tahorot:["טהרות"],Mikvaot:["מקואות"],Makhshirin:["מכשירין"],Zavim:["זבים"],"Tevul Yom":["טבול יום"],Yadayim:["ידים"],Oktzin:["עוקצים"]}};var poHe = {headers:headers,contexts:contexts};
|
|
4731
4748
|
|
|
4732
4749
|
Locale.addLocale('he', poHe);
|
|
4733
4750
|
Locale.addLocale('h', poHe);
|
|
@@ -4748,6 +4765,164 @@ const poHeNoNikud = {
|
|
|
4748
4765
|
};
|
|
4749
4766
|
Locale.addLocale(localeName, poHeNoNikud);
|
|
4750
4767
|
|
|
4768
|
+
/**
|
|
4769
|
+
* @private
|
|
4770
|
+
* @param {MishnaYomi[]} mishnaYomi
|
|
4771
|
+
* @param {string} locale
|
|
4772
|
+
* @return {string}
|
|
4773
|
+
*/
|
|
4774
|
+
|
|
4775
|
+
function formatMyomi(mishnaYomi, locale) {
|
|
4776
|
+
const k1 = mishnaYomi[0].k;
|
|
4777
|
+
const cv1 = mishnaYomi[0].v;
|
|
4778
|
+
const mishna1 = Locale.gettext(k1, locale) + ' ' + cv1;
|
|
4779
|
+
const k2 = mishnaYomi[1].k;
|
|
4780
|
+
const cv2 = mishnaYomi[1].v;
|
|
4781
|
+
|
|
4782
|
+
if (k1 !== k2) {
|
|
4783
|
+
return mishna1 + '-' + Locale.gettext(k2, locale) + ' ' + cv2;
|
|
4784
|
+
}
|
|
4785
|
+
|
|
4786
|
+
const p1 = cv1.split(':');
|
|
4787
|
+
const p2 = cv2.split(':');
|
|
4788
|
+
|
|
4789
|
+
if (p1[0] === p2[0]) {
|
|
4790
|
+
return mishna1 + '-' + p2[1];
|
|
4791
|
+
}
|
|
4792
|
+
|
|
4793
|
+
return mishna1 + '-' + cv2;
|
|
4794
|
+
}
|
|
4795
|
+
/**
|
|
4796
|
+
* Event wrapper around a Mishna Yomi instance
|
|
4797
|
+
*/
|
|
4798
|
+
|
|
4799
|
+
|
|
4800
|
+
class MishnaYomiEvent extends Event {
|
|
4801
|
+
/**
|
|
4802
|
+
* @param {HDate} date
|
|
4803
|
+
* @param {MishnaYomi[]} mishnaYomi
|
|
4804
|
+
*/
|
|
4805
|
+
constructor(date, mishnaYomi) {
|
|
4806
|
+
super(date, formatMyomi(mishnaYomi, null), flags.MISHNA_YOMI, {
|
|
4807
|
+
mishnaYomi
|
|
4808
|
+
});
|
|
4809
|
+
}
|
|
4810
|
+
/**
|
|
4811
|
+
* Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
|
|
4812
|
+
* @param {string} [locale] Optional locale name (defaults to active locale).
|
|
4813
|
+
* @return {string}
|
|
4814
|
+
*/
|
|
4815
|
+
|
|
4816
|
+
|
|
4817
|
+
render(locale) {
|
|
4818
|
+
return formatMyomi(this.mishnaYomi, locale);
|
|
4819
|
+
}
|
|
4820
|
+
/**
|
|
4821
|
+
* Returns a link to sefaria.org
|
|
4822
|
+
* @return {string}
|
|
4823
|
+
*/
|
|
4824
|
+
|
|
4825
|
+
|
|
4826
|
+
url() {
|
|
4827
|
+
const mishnaYomi = this.mishnaYomi;
|
|
4828
|
+
const k1 = mishnaYomi[0].k;
|
|
4829
|
+
const mishna = k1 === 'Avot' ? 'Pirkei' : 'Mishnah';
|
|
4830
|
+
const name = k1.replace(/ /g, '_');
|
|
4831
|
+
const prefix = `https://www.sefaria.org/${mishna}_${name}`;
|
|
4832
|
+
const cv1 = mishnaYomi[0].v;
|
|
4833
|
+
|
|
4834
|
+
if (k1 !== mishnaYomi[1].k) {
|
|
4835
|
+
return `${prefix}.${cv1}?lang=bi`;
|
|
4836
|
+
}
|
|
4837
|
+
|
|
4838
|
+
const cv2 = mishnaYomi[1].v;
|
|
4839
|
+
const p1 = cv1.split(':');
|
|
4840
|
+
const p2 = cv2.split(':');
|
|
4841
|
+
const verse1 = p1.join('.');
|
|
4842
|
+
const verse2 = p1[0] === p2[0] ? p2[1] : p2.join('.');
|
|
4843
|
+
return `${prefix}.${verse1}-${verse2}?lang=bi`;
|
|
4844
|
+
}
|
|
4845
|
+
|
|
4846
|
+
}
|
|
4847
|
+
|
|
4848
|
+
var mishnayot = [{k:"Berakhot",v:[5,8,6,7,5,8,5,8,5]},{k:"Peah",v:[6,8,8,11,8,11,8,9]},{k:"Demai",v:[4,5,6,7,11,12,8]},{k:"Kilayim",v:[9,11,7,9,8,9,8,6,10]},{k:"Sheviit",v:[8,10,10,10,9,6,7,11,9,9]},{k:"Terumot",v:[10,6,9,13,9,6,7,12,7,12,10]},{k:"Maasrot",v:[8,8,10,6,8]},{k:"Maaser Sheni",v:[7,10,13,12,15]},{k:"Challah",v:[9,8,10,11]},{k:"Orlah",v:[9,17,9]},{k:"Bikkurim",v:[11,11,12,5]},{k:"Shabbat",v:[11,7,6,2,4,10,4,7,7,6,6,6,7,4,3,8,8,3,6,5,3,6,5,5]},{k:"Eruvin",v:[10,6,9,11,9,10,11,11,4,15]},{k:"Pesachim",v:[7,8,8,9,10,6,13,8,11,9]},{k:"Shekalim",v:[7,5,4,9,6,6,7,8]},{k:"Yoma",v:[8,7,11,6,7,8,5,9]},{k:"Sukkah",v:[11,9,15,10,8]},{k:"Beitzah",v:[10,10,8,7,7]},{k:"Rosh Hashanah",v:[9,9,8,9]},{k:"Taanit",v:[7,10,9,8]},{k:"Megillah",v:[11,6,6,10]},{k:"Moed Katan",v:[10,5,9]},{k:"Chagigah",v:[8,7,8]},{k:"Yevamot",v:[4,10,10,13,6,6,6,6,6,9,7,6,13,9,10,7]},{k:"Ketubot",v:[10,10,9,12,9,7,10,8,9,6,6,4,11]},{k:"Nedarim",v:[4,5,11,8,6,10,9,7,10,8,12]},{k:"Nazir",v:[7,10,7,7,7,11,4,2,5]},{k:"Sotah",v:[9,6,8,5,5,4,8,7,15]},{k:"Gittin",v:[6,7,8,9,9,7,9,10,10]},{k:"Kiddushin",v:[10,10,13,14]},{k:"Bava Kamma",v:[4,6,11,9,7,6,7,7,12,10]},{k:"Bava Metzia",v:[8,11,12,12,11,8,11,9,13,6]},{k:"Bava Batra",v:[6,14,8,9,11,8,4,8,10,8]},{k:"Sanhedrin",v:[6,5,8,5,5,6,11,7,6,6,6]},{k:"Makkot",v:[10,8,16]},{k:"Shevuot",v:[7,5,11,13,5,7,8,6]},{k:"Eduyot",v:[14,10,12,12,7,3,9,7]},{k:"Avodah Zarah",v:[9,7,10,12,12]},{k:"Avot",v:[18,16,18,22,23,11]},{k:"Horayot",v:[5,7,8]},{k:"Zevachim",v:[4,5,6,6,8,7,6,12,7,8,8,6,8,10]},{k:"Menachot",v:[4,5,7,5,9,7,6,7,9,9,9,5,11]},{k:"Chullin",v:[7,10,7,7,5,7,6,6,8,4,2,5]},{k:"Bekhorot",v:[7,9,4,10,6,12,7,10,8]},{k:"Arakhin",v:[4,6,5,4,6,5,5,7,8]},{k:"Temurah",v:[6,3,5,4,6,5,6]},{k:"Keritot",v:[7,6,10,3,8,9]},{k:"Meilah",v:[4,9,8,6,5,6]},{k:"Tamid",v:[4,5,9,3,6,3,4]},{k:"Middot",v:[9,6,8,7,4]},{k:"Kinnim",v:[4,5,6]},{k:"Kelim",v:[9,8,8,4,11,4,6,11,8,8,9,8,8,8,6,8,17,9,10,7,3,10,5,17,9,9,12,10,8,4]},{k:"Oholot",v:[8,7,7,3,7,7,6,6,16,7,9,8,6,7,10,5,5,10]},{k:"Negaim",v:[6,5,8,11,5,8,5,10,3,10,12,7,12,13]},{k:"Parah",v:[4,5,11,4,9,5,12,11,9,6,9,11]},{k:"Tahorot",v:[9,8,8,13,9,10,9,9,9,8]},{k:"Mikvaot",v:[8,10,4,5,6,11,7,5,7,8]},{k:"Niddah",v:[7,7,7,7,9,14,5,4,11,8]},{k:"Makhshirin",v:[6,11,8,10,11,8]},{k:"Zavim",v:[6,4,3,7,12]},{k:"Tevul Yom",v:[5,8,6,7]},{k:"Yadayim",v:[5,4,5,8]},{k:"Oktzin",v:[6,10,12]}];
|
|
4849
|
+
|
|
4850
|
+
const cycleStartDate = new Date(1947, 4, 20);
|
|
4851
|
+
const mishnaYomiStart = greg.greg2abs(cycleStartDate);
|
|
4852
|
+
const numMishnayot = 4192;
|
|
4853
|
+
const numDays = numMishnayot / 2;
|
|
4854
|
+
/**
|
|
4855
|
+
* Options to configure which events are returned
|
|
4856
|
+
* @typedef {Object} MishnaYomi
|
|
4857
|
+
* @property {string} k tractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan")
|
|
4858
|
+
* @property {string} v verse (e.g. "2:1")
|
|
4859
|
+
*/
|
|
4860
|
+
// eslint-disable-next-line require-jsdoc
|
|
4861
|
+
|
|
4862
|
+
function throwTypeError(msg) {
|
|
4863
|
+
throw new TypeError(msg);
|
|
4864
|
+
}
|
|
4865
|
+
/**
|
|
4866
|
+
* A program of daily learning in which participants study two Mishnahs
|
|
4867
|
+
* each day in order to finish the entire Mishnah in ~6 years.
|
|
4868
|
+
*/
|
|
4869
|
+
|
|
4870
|
+
|
|
4871
|
+
class MinshnaYomiIndex {
|
|
4872
|
+
/**
|
|
4873
|
+
* Initializes a Mishna Yomi instance
|
|
4874
|
+
*/
|
|
4875
|
+
constructor() {
|
|
4876
|
+
const tmp = Array(numMishnayot);
|
|
4877
|
+
let i = 0;
|
|
4878
|
+
|
|
4879
|
+
for (const tractate of mishnayot) {
|
|
4880
|
+
const v = tractate.v;
|
|
4881
|
+
|
|
4882
|
+
for (let chap = 1; chap <= v.length; chap++) {
|
|
4883
|
+
const numv = v[chap - 1];
|
|
4884
|
+
|
|
4885
|
+
for (let verse = 1; verse <= numv; verse++) {
|
|
4886
|
+
tmp[i++] = {
|
|
4887
|
+
k: tractate.k,
|
|
4888
|
+
v: `${chap}:${verse}`
|
|
4889
|
+
};
|
|
4890
|
+
}
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4893
|
+
|
|
4894
|
+
const days = Array(numDays);
|
|
4895
|
+
|
|
4896
|
+
for (let j = 0; j < numDays; j++) {
|
|
4897
|
+
const k = j * 2;
|
|
4898
|
+
days[j] = [tmp[k], tmp[k + 1]];
|
|
4899
|
+
}
|
|
4900
|
+
/** @type {MishnaYomi[]} */
|
|
4901
|
+
|
|
4902
|
+
|
|
4903
|
+
this.days = days;
|
|
4904
|
+
}
|
|
4905
|
+
/**
|
|
4906
|
+
* Looks up a Mishna Yomi
|
|
4907
|
+
* @param {Date|HDate|number} date Gregorian date
|
|
4908
|
+
* @return {MishnaYomi[]}
|
|
4909
|
+
*/
|
|
4910
|
+
|
|
4911
|
+
|
|
4912
|
+
lookup(date) {
|
|
4913
|
+
const abs = typeof date === 'number' && !isNaN(date) ? date : greg.isDate(date) ? greg.greg2abs(date) : HDate.isHDate(date) ? date.abs() : throwTypeError(`Invalid date: ${date}`);
|
|
4914
|
+
|
|
4915
|
+
if (abs < mishnaYomiStart) {
|
|
4916
|
+
const s = date.toISOString().substring(0, 10);
|
|
4917
|
+
throw new RangeError(`Date ${s} too early; Mishna Yomi cycle began on 1947-05-20`);
|
|
4918
|
+
}
|
|
4919
|
+
|
|
4920
|
+
const dayNum = (abs - mishnaYomiStart) % numDays;
|
|
4921
|
+
return this.days[dayNum];
|
|
4922
|
+
}
|
|
4923
|
+
|
|
4924
|
+
}
|
|
4925
|
+
|
|
4751
4926
|
/*
|
|
4752
4927
|
Hebcal - A Jewish Calendar Generator
|
|
4753
4928
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -4823,6 +4998,7 @@ const RECOGNIZED_OPTIONS = {
|
|
|
4823
4998
|
noSpecialShabbat: 1,
|
|
4824
4999
|
noHolidays: 1,
|
|
4825
5000
|
dafyomi: 1,
|
|
5001
|
+
mishnaYomi: 1,
|
|
4826
5002
|
omer: 1,
|
|
4827
5003
|
molad: 1,
|
|
4828
5004
|
ashkenazi: 1,
|
|
@@ -4923,6 +5099,7 @@ function checkCandleOptions(options) {
|
|
|
4923
5099
|
* @property {boolean} noSpecialShabbat - suppress Special Shabbat
|
|
4924
5100
|
* @property {boolean} noHolidays - suppress regular holidays
|
|
4925
5101
|
* @property {boolean} dafyomi - include Daf Yomi
|
|
5102
|
+
* @property {boolean} mishnaYomi - include Mishna Yomi
|
|
4926
5103
|
* @property {boolean} omer - include Days of the Omer
|
|
4927
5104
|
* @property {boolean} molad - include event announcing the molad
|
|
4928
5105
|
* @property {boolean} ashkenazi - use Ashkenazi transliterations for event titles (default Sephardi transliterations)
|
|
@@ -4946,7 +5123,7 @@ function checkCandleOptions(options) {
|
|
|
4946
5123
|
function getAbs(d) {
|
|
4947
5124
|
if (typeof d == 'number') return d;
|
|
4948
5125
|
if (greg.isDate(d)) return greg.greg2abs(d);
|
|
4949
|
-
if (HDate
|
|
5126
|
+
if (HDate.isHDate(d)) return d.abs();
|
|
4950
5127
|
throw new TypeError(`Invalid date type: ${d}`);
|
|
4951
5128
|
}
|
|
4952
5129
|
/**
|
|
@@ -4965,7 +5142,7 @@ function getStartAndEnd(options) {
|
|
|
4965
5142
|
}
|
|
4966
5143
|
|
|
4967
5144
|
const isHebrewYear = Boolean(options.isHebrewYear);
|
|
4968
|
-
const theYear = typeof options.year !== 'undefined' ? parseInt(options.year, 10) : isHebrewYear ? new HDate
|
|
5145
|
+
const theYear = typeof options.year !== 'undefined' ? parseInt(options.year, 10) : isHebrewYear ? new HDate().getFullYear() : new Date().getFullYear();
|
|
4969
5146
|
|
|
4970
5147
|
if (isNaN(theYear)) {
|
|
4971
5148
|
throw new RangeError(`Invalid year ${options.year}`);
|
|
@@ -4979,7 +5156,7 @@ function getStartAndEnd(options) {
|
|
|
4979
5156
|
|
|
4980
5157
|
if (options.month) {
|
|
4981
5158
|
if (isHebrewYear) {
|
|
4982
|
-
theMonth = HDate
|
|
5159
|
+
theMonth = HDate.monthNum(options.month);
|
|
4983
5160
|
} else {
|
|
4984
5161
|
theMonth = options.month;
|
|
4985
5162
|
}
|
|
@@ -4988,9 +5165,9 @@ function getStartAndEnd(options) {
|
|
|
4988
5165
|
const numYears = parseInt(options.numYears, 10) || 1;
|
|
4989
5166
|
|
|
4990
5167
|
if (isHebrewYear) {
|
|
4991
|
-
const startDate = new HDate
|
|
5168
|
+
const startDate = new HDate(1, theMonth || TISHREI, theYear);
|
|
4992
5169
|
let startAbs = startDate.abs();
|
|
4993
|
-
const endAbs = options.month ? startAbs + startDate.daysInMonth() : new HDate
|
|
5170
|
+
const endAbs = options.month ? startAbs + startDate.daysInMonth() : new HDate(1, TISHREI, theYear + numYears).abs() - 1; // for full Hebrew year, start on Erev Rosh Hashana which
|
|
4994
5171
|
// is technically in the previous Hebrew year
|
|
4995
5172
|
// (but conveniently lets us get candle-lighting time for Erev)
|
|
4996
5173
|
|
|
@@ -5044,6 +5221,7 @@ function getMaskFromOptions(options) {
|
|
|
5044
5221
|
if (m & DAF_YOMI) options.dafyomi = true;
|
|
5045
5222
|
if (m & OMER_COUNT) options.omer = true;
|
|
5046
5223
|
if (m & SHABBAT_MEVARCHIM) options.shabbatMevarchim = true;
|
|
5224
|
+
if (m & flags.MISHNA_YOMI) options.mishnaYomi = true;
|
|
5047
5225
|
options.userMask = true;
|
|
5048
5226
|
return m;
|
|
5049
5227
|
}
|
|
@@ -5092,6 +5270,10 @@ function getMaskFromOptions(options) {
|
|
|
5092
5270
|
mask |= DAF_YOMI;
|
|
5093
5271
|
}
|
|
5094
5272
|
|
|
5273
|
+
if (options.mishnaYomi) {
|
|
5274
|
+
mask |= flags.MISHNA_YOMI;
|
|
5275
|
+
}
|
|
5276
|
+
|
|
5095
5277
|
if (options.omer) {
|
|
5096
5278
|
mask |= OMER_COUNT;
|
|
5097
5279
|
}
|
|
@@ -5147,6 +5329,7 @@ const HebrewCalendar = {
|
|
|
5147
5329
|
* * Parashat HaShavua - weekly Torah Reading on Saturdays (`options.sedrot`)
|
|
5148
5330
|
* * Counting of the Omer (`options.omer`)
|
|
5149
5331
|
* * Daf Yomi (`options.dafyomi`)
|
|
5332
|
+
* * Mishna Yomi (`options.mishnaYomi`)
|
|
5150
5333
|
* * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
|
|
5151
5334
|
* * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
|
|
5152
5335
|
*
|
|
@@ -5253,8 +5436,14 @@ const HebrewCalendar = {
|
|
|
5253
5436
|
options.candlelighting = false;
|
|
5254
5437
|
}
|
|
5255
5438
|
|
|
5439
|
+
let mishnaYomiIndex;
|
|
5440
|
+
|
|
5441
|
+
if (options.mishnaYomi) {
|
|
5442
|
+
mishnaYomiIndex = new MinshnaYomiIndex();
|
|
5443
|
+
}
|
|
5444
|
+
|
|
5256
5445
|
for (let abs = startAbs; abs <= endAbs; abs++) {
|
|
5257
|
-
const hd = new HDate
|
|
5446
|
+
const hd = new HDate(abs);
|
|
5258
5447
|
const hyear = hd.getFullYear();
|
|
5259
5448
|
|
|
5260
5449
|
if (hyear != currentYear) {
|
|
@@ -5266,8 +5455,8 @@ const HebrewCalendar = {
|
|
|
5266
5455
|
}
|
|
5267
5456
|
|
|
5268
5457
|
if (options.omer) {
|
|
5269
|
-
beginOmer = HDate
|
|
5270
|
-
endOmer = HDate
|
|
5458
|
+
beginOmer = HDate.hebrew2abs(currentYear, NISAN, 16);
|
|
5459
|
+
endOmer = HDate.hebrew2abs(currentYear, SIVAN, 5);
|
|
5271
5460
|
}
|
|
5272
5461
|
}
|
|
5273
5462
|
|
|
@@ -5291,6 +5480,11 @@ const HebrewCalendar = {
|
|
|
5291
5480
|
evts.push(new DafYomiEvent(hd));
|
|
5292
5481
|
}
|
|
5293
5482
|
|
|
5483
|
+
if (options.mishnaYomi && abs >= mishnaYomiStart) {
|
|
5484
|
+
const mishnaYomi = mishnaYomiIndex.lookup(abs);
|
|
5485
|
+
evts.push(new MishnaYomiEvent(hd, mishnaYomi));
|
|
5486
|
+
}
|
|
5487
|
+
|
|
5294
5488
|
if (options.omer && abs >= beginOmer && abs <= endOmer) {
|
|
5295
5489
|
const omer = abs - beginOmer + 1;
|
|
5296
5490
|
evts.push(new OmerEvent(hd, omer));
|
|
@@ -5299,14 +5493,14 @@ const HebrewCalendar = {
|
|
|
5299
5493
|
const hmonth = hd.getMonth();
|
|
5300
5494
|
|
|
5301
5495
|
if (options.molad && dow == SAT && hmonth != ELUL && hd.getDate() >= 23 && hd.getDate() <= 29) {
|
|
5302
|
-
const monNext = hmonth == HDate
|
|
5496
|
+
const monNext = hmonth == HDate.monthsInYear(hyear) ? NISAN : hmonth + 1;
|
|
5303
5497
|
evts.push(new MoladEvent(hd, hyear, monNext));
|
|
5304
5498
|
}
|
|
5305
5499
|
|
|
5306
5500
|
if (!candlesEv && options.candlelighting && (dow == FRI || dow == SAT)) {
|
|
5307
5501
|
candlesEv = makeCandleEvent(undefined, hd, dow, location, options);
|
|
5308
5502
|
|
|
5309
|
-
if (dow
|
|
5503
|
+
if (dow === FRI && candlesEv && sedra) {
|
|
5310
5504
|
candlesEv.memo = sedra.getString(abs);
|
|
5311
5505
|
}
|
|
5312
5506
|
} // suppress Havdalah when options.havdalahMins=0 or options.havdalahDeg=0
|
|
@@ -5361,7 +5555,7 @@ const HebrewCalendar = {
|
|
|
5361
5555
|
* @return {HDate} anniversary occurring in `hyear`
|
|
5362
5556
|
*/
|
|
5363
5557
|
getBirthdayOrAnniversary: function (hyear, gdate) {
|
|
5364
|
-
const orig = HDate
|
|
5558
|
+
const orig = HDate.isHDate(gdate) ? gdate : new HDate(gdate);
|
|
5365
5559
|
const origYear = orig.getFullYear();
|
|
5366
5560
|
|
|
5367
5561
|
if (hyear <= origYear) {
|
|
@@ -5369,24 +5563,24 @@ const HebrewCalendar = {
|
|
|
5369
5563
|
return undefined;
|
|
5370
5564
|
}
|
|
5371
5565
|
|
|
5372
|
-
const isOrigLeap = HDate
|
|
5566
|
+
const isOrigLeap = HDate.isLeapYear(origYear);
|
|
5373
5567
|
let month = orig.getMonth();
|
|
5374
5568
|
let day = orig.getDate();
|
|
5375
5569
|
|
|
5376
5570
|
if (month == ADAR_I && !isOrigLeap || month == ADAR_II && isOrigLeap) {
|
|
5377
|
-
month = HDate
|
|
5378
|
-
} else if (month == CHESHVAN && day == 30 && !HDate
|
|
5571
|
+
month = HDate.monthsInYear(hyear);
|
|
5572
|
+
} else if (month == CHESHVAN && day == 30 && !HDate.longCheshvan(hyear)) {
|
|
5379
5573
|
month = KISLEV;
|
|
5380
5574
|
day = 1;
|
|
5381
|
-
} else if (month == KISLEV && day == 30 && HDate
|
|
5575
|
+
} else if (month == KISLEV && day == 30 && HDate.shortKislev(hyear)) {
|
|
5382
5576
|
month = TEVET;
|
|
5383
5577
|
day = 1;
|
|
5384
|
-
} else if (month == ADAR_I && day == 30 && isOrigLeap && !HDate
|
|
5578
|
+
} else if (month == ADAR_I && day == 30 && isOrigLeap && !HDate.isLeapYear(hyear)) {
|
|
5385
5579
|
month = NISAN;
|
|
5386
5580
|
day = 1;
|
|
5387
5581
|
}
|
|
5388
5582
|
|
|
5389
|
-
return new HDate
|
|
5583
|
+
return new HDate(day, month, hyear);
|
|
5390
5584
|
},
|
|
5391
5585
|
|
|
5392
5586
|
/**
|
|
@@ -5424,7 +5618,7 @@ const HebrewCalendar = {
|
|
|
5424
5618
|
* @return {HDate} anniversary occurring in hyear
|
|
5425
5619
|
*/
|
|
5426
5620
|
getYahrzeit: function (hyear, gdate) {
|
|
5427
|
-
const orig = HDate
|
|
5621
|
+
const orig = HDate.isHDate(gdate) ? gdate : new HDate(gdate);
|
|
5428
5622
|
let hDeath = {
|
|
5429
5623
|
yy: orig.getFullYear(),
|
|
5430
5624
|
mm: orig.getMonth(),
|
|
@@ -5436,18 +5630,18 @@ const HebrewCalendar = {
|
|
|
5436
5630
|
return undefined;
|
|
5437
5631
|
}
|
|
5438
5632
|
|
|
5439
|
-
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate
|
|
5633
|
+
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate.longCheshvan(hDeath.yy + 1)) {
|
|
5440
5634
|
// If it's Heshvan 30 it depends on the first anniversary;
|
|
5441
5635
|
// if that was not Heshvan 30, use the day before Kislev 1.
|
|
5442
|
-
hDeath = HDate
|
|
5443
|
-
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate
|
|
5636
|
+
hDeath = HDate.abs2hebrew(HDate.hebrew2abs(hyear, KISLEV, 1) - 1);
|
|
5637
|
+
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate.shortKislev(hDeath.yy + 1)) {
|
|
5444
5638
|
// If it's Kislev 30 it depends on the first anniversary;
|
|
5445
5639
|
// if that was not Kislev 30, use the day before Teveth 1.
|
|
5446
|
-
hDeath = HDate
|
|
5640
|
+
hDeath = HDate.abs2hebrew(HDate.hebrew2abs(hyear, TEVET, 1) - 1);
|
|
5447
5641
|
} else if (hDeath.mm == ADAR_II) {
|
|
5448
5642
|
// If it's Adar II, use the same day in last month of year (Adar or Adar II).
|
|
5449
|
-
hDeath.mm = HDate
|
|
5450
|
-
} else if (hDeath.mm == ADAR_I && hDeath.dd == 30 && !HDate
|
|
5643
|
+
hDeath.mm = HDate.monthsInYear(hyear);
|
|
5644
|
+
} else if (hDeath.mm == ADAR_I && hDeath.dd == 30 && !HDate.isLeapYear(hyear)) {
|
|
5451
5645
|
// If it's the 30th in Adar I and year is not a leap year
|
|
5452
5646
|
// (so Adar has only 29 days), use the last day in Shevat.
|
|
5453
5647
|
hDeath.dd = 30;
|
|
@@ -5456,15 +5650,15 @@ const HebrewCalendar = {
|
|
|
5456
5650
|
// advance day to rosh chodesh if needed
|
|
5457
5651
|
|
|
5458
5652
|
|
|
5459
|
-
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate
|
|
5653
|
+
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate.longCheshvan(hyear)) {
|
|
5460
5654
|
hDeath.mm = KISLEV;
|
|
5461
5655
|
hDeath.dd = 1;
|
|
5462
|
-
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate
|
|
5656
|
+
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate.shortKislev(hyear)) {
|
|
5463
5657
|
hDeath.mm = TEVET;
|
|
5464
5658
|
hDeath.dd = 1;
|
|
5465
5659
|
}
|
|
5466
5660
|
|
|
5467
|
-
return new HDate
|
|
5661
|
+
return new HDate(hDeath.dd, hDeath.mm, hyear);
|
|
5468
5662
|
},
|
|
5469
5663
|
|
|
5470
5664
|
/**
|
|
@@ -5485,12 +5679,12 @@ const HebrewCalendar = {
|
|
|
5485
5679
|
*/
|
|
5486
5680
|
getHolidaysForYearArray: function (year, il) {
|
|
5487
5681
|
const yearMap = HebrewCalendar.getHolidaysForYear(year);
|
|
5488
|
-
const startAbs = HDate
|
|
5489
|
-
const endAbs = HDate
|
|
5682
|
+
const startAbs = HDate.hebrew2abs(year, TISHREI, 1);
|
|
5683
|
+
const endAbs = HDate.hebrew2abs(year + 1, TISHREI, 1) - 1;
|
|
5490
5684
|
const events = [];
|
|
5491
5685
|
|
|
5492
5686
|
for (let absDt = startAbs; absDt <= endAbs; absDt++) {
|
|
5493
|
-
const hd = new HDate
|
|
5687
|
+
const hd = new HDate(absDt);
|
|
5494
5688
|
const holidays = yearMap.get(hd.toString());
|
|
5495
5689
|
|
|
5496
5690
|
if (holidays) {
|
|
@@ -5509,7 +5703,7 @@ const HebrewCalendar = {
|
|
|
5509
5703
|
* @return {Event[]}
|
|
5510
5704
|
*/
|
|
5511
5705
|
getHolidaysOnDate: function (date, il) {
|
|
5512
|
-
const hd = HDate
|
|
5706
|
+
const hd = HDate.isHDate(date) ? date : new HDate(date);
|
|
5513
5707
|
const yearMap = HebrewCalendar.getHolidaysForYear(hd.getFullYear());
|
|
5514
5708
|
const events = yearMap.get(hd.toString());
|
|
5515
5709
|
|
|
@@ -5644,7 +5838,7 @@ exports.CandleLightingEvent = CandleLightingEvent;
|
|
|
5644
5838
|
exports.DafYomi = DafYomi;
|
|
5645
5839
|
exports.DafYomiEvent = DafYomiEvent;
|
|
5646
5840
|
exports.Event = Event;
|
|
5647
|
-
exports.HDate = HDate
|
|
5841
|
+
exports.HDate = HDate;
|
|
5648
5842
|
exports.HavdalahEvent = HavdalahEvent;
|
|
5649
5843
|
exports.HebrewCalendar = HebrewCalendar;
|
|
5650
5844
|
exports.HebrewDateEvent = HebrewDateEvent;
|