@hebcal/leyning 4.18.1 → 4.18.2

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/leyning v4.18.1 */
1
+ /*! @hebcal/leyning v4.18.2 */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -939,7 +939,8 @@ function getLeyningForParsha(parsha) {
939
939
  return result;
940
940
  }
941
941
  /**
942
- * Looks up leyning for a regular Shabbat parsha.
942
+ * Looks up leyning for a regular Shabbat parsha, including any special
943
+ * maftir or Haftara.
943
944
  * @param {Event} ev the Hebcal event associated with this leyning
944
945
  * @param {boolean} [il] in Israel
945
946
  * @return {Leyning} map of aliyot
@@ -1006,7 +1007,18 @@ function getLeyningForParshaHaShavua(ev, il = false) {
1006
1007
  return result;
1007
1008
  }
1008
1009
  /**
1009
- * Looks up leyning for a regular Shabbat or holiday
1010
+ * Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
1011
+ *
1012
+ * If `hdate` coincides with a holiday that has Torah reading, returns the
1013
+ * reading for that day (see {@link getLeyningForHoliday})
1014
+ *
1015
+ * Otherwise, if `hdate` is a Saturday, returns {@link getLeyningForParshaHaShavua}
1016
+ *
1017
+ * Otherwise, if `hdate` is a Monday or Thursday, returns {@link Leyning} for the
1018
+ * Parashat haShavua, containing only the `weekday` aliyot (no `fullkriyah`).
1019
+ *
1020
+ * Otherwise, returns `undefined`.
1021
+ *
1010
1022
  * @param {HDate} hdate Hebrew Date
1011
1023
  * @param {boolean} il in Israel
1012
1024
  * @return {Leyning} map of aliyot
@@ -1025,8 +1037,21 @@ function getLeyningOnDate(hdate, il) {
1025
1037
 
1026
1038
  const events = core.HebrewCalendar.getHolidaysOnDate(hdate, il);
1027
1039
 
1028
- if (!events && (dow === 1 || dow === 4)) {
1029
- const reading = getLeyningForParsha(parsha.parsha);
1040
+ if (events) {
1041
+ const reading = getLeyningForHoliday(events[0], il);
1042
+
1043
+ if (reading) {
1044
+ return reading;
1045
+ } else if (dow !== 1 && dow !== 4) {
1046
+ return undefined; // today is a non-reading holiday
1047
+ } // otherwise continue below for Mon/Thu
1048
+
1049
+ }
1050
+
1051
+ if (dow === 1 || dow === 4) {
1052
+ const saturday = hdate.onOrAfter(6);
1053
+ const parsha2 = findParshaHaShavua(saturday);
1054
+ const reading = getLeyningForParsha(parsha2.parsha);
1030
1055
  const result = {
1031
1056
  name: reading.name,
1032
1057
  parsha: reading.parsha,
@@ -1034,9 +1059,43 @@ function getLeyningOnDate(hdate, il) {
1034
1059
  weekday: reading.weekday
1035
1060
  };
1036
1061
  return result;
1062
+ } // no reading today: it's not Shabbat, Mon/Thu, or a Torah-reading holiday
1063
+
1064
+
1065
+ return undefined;
1066
+ }
1067
+ /**
1068
+ * @private
1069
+ * @param {HDate} saturday
1070
+ * @param {boolean} il
1071
+ * @return {Leyning}
1072
+ */
1073
+
1074
+ function findParshaHaShavua(saturday, il) {
1075
+ const hyear = saturday.getFullYear();
1076
+ const sedra = core.HebrewCalendar.getSedra(hyear, il);
1077
+ const parsha = sedra.lookup(saturday);
1078
+
1079
+ if (!parsha.chag) {
1080
+ return parsha;
1081
+ } // Search for next regular parsha, which could even spill into next year
1082
+
1083
+
1084
+ const endOfYear = new core.HDate(1, core.months.TISHREI, hyear + 1).abs() - 1;
1085
+ const endAbs = endOfYear + 30;
1086
+
1087
+ for (let sat2 = saturday.abs() + 7; sat2 <= endAbs; sat2 += 7) {
1088
+ const sedra2 = sat2 > endOfYear ? core.HebrewCalendar.getSedra(hyear + 1, il) : sedra;
1089
+ const parsha2 = sedra2.lookup(sat2);
1090
+
1091
+ if (!parsha2.chag) {
1092
+ return parsha2;
1093
+ }
1037
1094
  }
1095
+ /* NOTREACHED */
1096
+
1038
1097
 
1039
- return events ? getLeyningForHoliday(events[0], il) : undefined;
1098
+ return null;
1040
1099
  }
1041
1100
 
1042
1101
  var Bereshit={"1":{k:"Isaiah",b:"42:5",e:"42:21",note:"God identified as the creator // Creation"},"2":{k:"Isaiah",b:"40:25",e:"40:31",note:"God created, called by name // Eden"},"3":{k:"II Kings",b:"2:1",e:"2:13",note:"Elijah taken // Hanokh"}};var Noach={"1":{k:"Isaiah",b:"54:11",e:"55:5",note:"Storm tossed boat // Ark"},"2":{k:"Isaiah",b:"54:1",e:"54:10",note:"waters of Noah no more"},"3":{k:"Zephaniah",b:"3:9",e:"3:20",note:"one language // babel"}};var Vayera={"1":{k:"II Kings",b:"4:8",e:"4:17",note:"birth of promised child // promise to Sarah"},"2":{k:"II Kings",b:"6:8",e:"6:23",note:"blinding episode // Sodom"},"3":{k:"II Kings",b:"4:18",e:"4:36",note:"saving of child // akedah"}};var Toldot={"1":{k:"Malachi",b:"1:1",e:"1:14",note:"Jacob / Esau"},"2":{k:"II Samuel",b:"19:32",e:"19:40",note:"Barzilay infirm in old age // Isaac"},"3":[{k:"Judges",b:"3:15",e:"3:27",note:"Ehud's ploy // Jacob's ploy"},{k:"Judges",b:"3:30",e:"3:30"}]};var Vayetzei={"1":{k:"Hosea",b:"12:3",e:"12:14",note:"Jacob story"},"2":{k:"Zechariah",b:"1:7",e:"1:17",note:"striped horses //streaked sheep"},"3":{k:"I Samuel",b:"19:11",e:"19:18",note:"deceit / terafim / female wiles // Rachel hides terafim"}};var Vayishlach={"1":[{k:"Obadiah",b:"1:10",e:"1:18",note:"Jacob defeats Edom (Babylon) // Jacob meets Esau"},{k:"Obadiah",b:"1:21",e:"1:21"}],"2":{k:"Jeremiah",b:"30:10",e:"30:22",note:"Jacob will return, settle // Jacob's early settling in Shechem and Bet El"},"3":[{k:"Amos",b:"1:1",e:"1:1",note:"prophecy against Edom // genealogy of Edom"},{k:"Amos",b:"1:11",e:"2:3"}]};var Vayeshev={"1":[{k:"Amos",b:"2:6",e:"3:2",note:"reference to sale of righteous // sale of Joseph"},{k:"Amos",b:"3:7",e:"3:8"}],"2":{k:"I Samuel",b:"24:2",e:"24:15",note:"recognition of significant object David to Saul // Tamar to Judah"},"3":{k:"Judges",b:"7:9",e:"7:20",note:"Gideon dream interpretation // Joseph's in jail"}};var Miketz={"1":{k:"I Kings",b:"3:5",e:"3:15",note:"Solomon's dream // Pharaoh's dream"},"2":{k:"I Kings",b:"3:16",e:"4:1",note:"Solomon's wisdom // Joseph's"},"3":{k:"I Kings",b:"10:1",e:"10:9",note:"Solomon's wisdom and household // Joseph's"}};var Vayigash={"1":{k:"Ezekiel",b:"37:15",e:"37:28",note:"Judah and Joseph united"},"2":{k:"Zechariah",b:"10:3",e:"10:12",note:"Judah and Joseph, return from Egypt // J & J, brothers return to Jacob"},"3":{k:"Isaiah",b:"41:1",e:"41:10",note:"brother helps / Jacob not fear // Joseph settles his family in Goshen"}};var Vayechi={"1":{k:"Amos",b:"5:4",e:"5:15",note:"prophecy to remnants of Joseph // Joseph and kids"},"2":{k:"I Kings",b:"2:1",e:"2:12",note:"David's // Jacob's last speech"},"3":[{k:"II Samuel",b:"1:12",e:"1:12",note:"(lament over) deaths of Saul and Jonathan // deaths of Jacob, Joseph"},{k:"II Samuel",b:"1:17",e:"1:27"}]};var Shemot={"1":[{k:"Isaiah",b:"27:6",e:"27:13",note:"growth of Jacob / Israel // Israel in Egypt"},{k:"Isaiah",b:"29:22",e:"29:23"}],"2":[{k:"Joshua",b:"5:13",e:"6:5",note:"Joshua shoes off // burning bush"},{k:"Joshua",b:"6:15",e:"6:16"}],"3":[{k:"I Samuel",b:"9:15",e:"9:21",note:"anointing of Saul // Moses"},{k:"I Samuel",b:"9:27",e:"10:1"}]};var Vaera={"1":[{k:"Jeremiah",b:"1:1",e:"1:10",note:"appointment of Jeremiah // Moses"},{k:"Jeremiah",b:"1:8",e:"1:8"}],"2":[{k:"Ezekiel",b:"28:25",e:"29:12",note:"Speak to Pharaoh, show Egypt, strike Nile"},{k:"Ezekiel",b:"29:21",e:"29:21"}],"3":[{k:"Isaiah",b:"10:12",e:"10:12",note:"smite Assyria as Egypt"},{k:"Isaiah",b:"10:15",e:"10:26"},{k:"Isaiah",b:"10:32",e:"10:33"}]};var Bo={"1":{k:"Jeremiah",b:"10:1",e:"10:10",note:"goyim will fear signs from heaven // plagues"},"2":{k:"Jeremiah",b:"46:13",e:"46:28",note:"Egypt's fall / Israel's redemption // Exodus"},"3":{k:"II Samuel",b:"7:18",e:"7:29",note:"David recalls Exodus"}};var Beshalach={"1":{k:"Judges",b:"4:4",e:"4:24",note:"defeat of Sisera // defeat of Pharaoh"},"2":{k:"Judges",b:"5:1",e:"5:31",note:"Deborah's song // Moses' song of sea"},"3":[{k:"Joshua",b:"3:9",e:"3:17",note:"splitting Jordan, crossing on dry land // splitting Red Sea"},{k:"Joshua",b:"4:19",e:"4:24"}]};var Yitro={"1":{k:"Isaiah",b:"6:1",e:"6:13",note:"Isaiah's revelation of God // Moses' revelation at Sinai"},"2":{k:"Isaiah",b:"44:9",e:"44:23",note:"making idols to false god // you shall have no other Gods"},"3":{k:"Ezekiel",b:"16:4",e:"16:14",note:"Israel's birth / covenant / marriage(?) // revelation at Sinai"}};var Mishpatim={"1":[{k:"Jeremiah",b:"34:12",e:"34:22",note:"Jeremiah refers to the law that followed the covenant // Mishpatim"},{k:"Jeremiah",b:"33:25",e:"33:26"}],"2":{k:"I Samuel",b:"18:20",e:"18:28",note:"Michal's bride price // a law of Mishpatim"},"3":{k:"Joshua",b:"24:16",e:"24:28",note:"Joshua's covenant // na'aseh v'nishma"}};var Terumah={"1":{k:"Zechariah",b:"2:5",e:"2:17",note:"God's presence in Israelvshakhanti b'tokhekh"},"2":{k:"I Kings",b:"6:1",e:"6:13",note:"Temple // Tabernacle"},"3":{k:"II Samuel",b:"7:1",e:"7:16",note:"Temple // Tabernacle"}};var Tetzaveh={"1":{k:"Ezekiel",b:"43:10",e:"43:17",note:"Temple // Tabernacle"},"2":{k:"Haggai",b:"1:1",e:"1:12",note:"T / T"},"3":{k:"Haggai",b:"2:1",e:"2:9",note:"T / T"}};var Vayakhel={"1":{k:"I Kings",b:"7:40",e:"7:50",note:"T / T"},"2":{k:"I Kings",b:"7:13",e:"7:26",note:"T / T"},"3":{k:"Ezekiel",b:"43:1",e:"43:9",note:"T / T"}};var Pekudei={"1":{k:"I Kings",b:"8:1",e:"8:11",note:"T / T"},"2":{k:"I Kings",b:"8:10",e:"8:21",note:"T / T"},"3":{k:"I Kings",b:"8:22",e:"8:39",note:"T / T"}};var Vayikra={"1":{k:"Isaiah",b:"43:21",e:"44:8",note:"sacrifices"},"2":{k:"I Samuel",b:"2:13",e:"2:26",note:"misbehaving kohanim // if a priest sins"},"3":{k:"Malachi",b:"2:13",e:"3:4",note:"sinfulness ruins offering // sin offerings"}};var Tzav={"1":[{k:"Jeremiah",b:"7:21",e:"7:28",note:"justice over sacrifices // sacrifices at Tabernacle"},{k:"Jeremiah",b:"9:22",e:"9:23"}],"2":{k:"Jeremiah",b:"33:14",e:"33:22",note:"priests offer sacrifices // sacrifices at Tabernacle"},"3":{k:"Ezekiel",b:"42:13",e:"42:20",note:"priestly precincts / clothes // priestly vestments"}};var Shmini={"1":{k:"II Samuel",b:"6:1",e:"6:15",note:"Uzza struck down // Nadav and Avihu"},"2":{k:"Ezekiel",b:"43:18",e:"43:27",note:"8th day sacrifices"},"3":{k:"Hosea",b:"9:1",e:"9:9",note:"Israel has eaten non-kosher // kashrut rules"}};var Tazria={"1":{k:"Isaiah",b:"46:3",e:"46:13",note:"since birth // birth"},"2":{k:"Jeremiah",b:"30:1",e:"30:9",note:"im yoled zakhar // v'yaldah zakhar"}};var Metzora={"1":{k:"II Kings",b:"5:1",e:"5:14",note:"Healing of a leper"},"2":{k:"II Kings",b:"7:3",e:"7:16",note:"4 lepers discover Aram's flight"},"3":{k:"II Kings",b:"5:20",e:"5:27",note:"Gechazi gets leprosy"}};var Kedoshim={"1":{k:"Isaiah",b:"61:1",e:"61:9",note:"you shall be called Priests // kedoshim"},"2":{k:"Amos",b:"9:7",e:"9:15",note:"opposite of chosenness"},"3":{k:"Hosea",b:"4:1",e:"4:15",note:"opposite of holiness / niuf // kedoshim, arayot"}};var Emor={"1":{k:"Ezekiel",b:"44:15",e:"44:24",note:"the conduct of kohanim"},"2":[{k:"Malachi",b:"2:1",e:"2:10",note:"conduct of kohanim / chillul hashem // particularly vs. 22:31-32"},{k:"Malachi",b:"2:7",e:"2:7"}],"3":[{k:"Nachum",b:"1:1",e:"1:7",note:"Judah shall observe its festivals // complete festival calendar"},{k:"Nachum",b:"2:1",e:"2:3"},{k:"Nachum",b:"2:2b",e:"2:3a"}]};var Behar={"1":{k:"Jeremiah",b:"32:6",e:"32:15",note:"land redemption // shmittah"},"2":{k:"Jeremiah",b:"32:16",e:"32:27",note:"prayerwill Israel ever redeem its land // shmittah"}};var Bechukotai={"1":{k:"Jeremiah",b:"17:1",e:"17:14",note:"blessings and curses // tokhechah"},"2":[{k:"Jeremiah",b:"16:9",e:"16:15",note:"desolation and redemption // tokhechah"},{k:"Jeremiah",b:"16:19",e:"16:21"}],"3":{k:"Malachi",b:"3:5",e:"3:12",note:"curses and blessings // tokhechah"}};var Bamidbar={"1":[{k:"Hosea",b:"2:1",e:"2:7",note:"number, lead thru desert as after Egypt // census, desert wanderings"},{k:"Hosea",b:"2:16",e:"2:22"}],"2":{k:"Isaiah",b:"63:7",e:"63:16",note:"God carries us as in desert // desert wanderings"},"3":[{k:"Joshua",b:"8:30",e:"8:35",note:"kohanim who carried the ark // korachites"},{k:"Joshua",b:"8:33",e:"8:33"}]};var Nasso={"1":[{k:"Joshua",b:"6:5",e:"6:14",note:"kohanim carrying ark // gershunites and merarites"},{k:"Joshua",b:"6:12",e:"6:12"}],"2":[{k:"Judges",b:"13:2",e:"13:14",note:"Samson // nazirite rules"},{k:"Judges",b:"13:24",e:"13:25"}],"3":[{k:"Joel",b:"1:8",e:"1:13",note:"end of sacrifices, hope for restart // dedication of Tabernacle"},{k:"Joel",b:"2:12",e:"2:14"}]};var Korach={"1":{k:"I Samuel",b:"12:1",e:"12:13",note:"Samuel's apologia references Moses leadership // Moses'"},"2":{k:"I Samuel",b:"12:13",e:"12:22",note:"appointing non-prophet as leader // Korach's rebellion"},"3":{k:"Ezekiel",b:"45:1",e:"45:15",note:"portion of kohen and levi"}};var Chukat={"1":{k:"Judges",b:"15:9",e:"15:20",note:"Samson gets miraculous water from split ground // splitting rock"},"2":{k:"Judges",b:"11:12",e:"11:27",note:"journey across Moav recalled"},"3":[{k:"II Kings",b:"18:1",e:"18:13",note:"Hezekiah destroys nachash n'choshet // Moses builds nachash n'choshet"},{k:"II Kings",b:"19:15",e:"19:19"}]};var Balak={"1":{k:"Micah",b:"6:1",e:"6:8",note:"events of Balak recalled"},"2":{k:"Micah",b:"5:1",e:"5:8",note:"she'erit Yaakov described // Bila'am's blessing"},"3":{k:"Joshua",b:"24:1",e:"24:14",note:"history mentions Balak"}};var Pinchas={"1":{k:"I Kings",b:"19:1",e:"19:16",note:"Elijah's zeal // Pinchas"},"2":[{k:"Joshua",b:"17:1",e:"17:6",note:"Bnot Tzlofhad"},{k:"Joshua",b:"17:17",e:"17:18"}],"3":{k:"Ezekiel",b:"46:1",e:"46:11",note:"sacrifices on Shabbat and holidays // detailed festival sacrifices"}};var Matot={"1":{k:"Jeremiah",b:"1:11",e:"2:3",note:"miztafon tipatach hara'ah"},"2":{k:"II Kings",b:"22:8",e:"22:19",note:"hinneni mevi ra'ah (Hezekiah's discovered book of Torah)"},"3":{k:"Jeremiah",b:"14:11",e:"14:22",note:"ki yatzumu, eineni shomea"}};var Masei={"1":[{k:"Jeremiah",b:"2:4",e:"2:13",note:"shtayim ra'ot asah ami"},{k:"Jeremiah",b:"4:1",e:"4:2"}],"2":[{k:"Jeremiah",b:"2:14",e:"2:28",note:"ra vamar ozvekh"},{k:"Jeremiah",b:"3:4",e:"3:4"}],"3":[{k:"I Kings",b:"9:2",e:"9:9",note:"l'mashal v'lishninah"},{k:"I Kings",b:"9:4",e:"9:5a"}]};var Eikev={"1":{k:"Isaiah",b:"49:14",e:"49:26",note:"ani moshiekh"},"2":{k:"Isaiah",b:"50:1",e:"51:3",note:"sason v'simcha yimatze"},"3":{k:"Zechariah",b:"8:1",e:"8:8",note:"be'emet u-vitzdakah"}};var Shoftim={"1":[{k:"Isaiah",b:"51:12",e:"51:23",note:"anokhi anokhi"},{k:"Isaiah",b:"51:22",e:"51:22"}],"2":{k:"Isaiah",b:"52:1",e:"52:12",note:"uri uri"},"3":{k:"Isaiah",b:"44:24",e:"45:7",note:"l'ma'an avdi"}};var Nitzavim={"1":{k:"Isaiah",b:"61:10",e:"62:12",note:"sos asis"},"2":{k:"Isaiah",b:"63:1",e:"63:9",note:"tzaratam lo tzar"},"3":{k:"Isaiah",b:"65:16",e:"65:25",note:"terem yikrau ani e'eneh"}};var Vayeilech={"1":{k:"Isaiah",b:"61:10",e:"62:12",note:"sos asis"},"2":{k:"Isaiah",b:"63:1",e:"63:9",note:"tzaratam lo tzar"},"3":{k:"Isaiah",b:"65:16",e:"65:25",note:"terem yikrau ani e'eneh"}};var _holidays={"Pesach I":{k:"Joshua",b:"5:2",e:"5:12"},"Pesach I (on Shabbat)":{k:"Joshua",b:"5:2",e:"5:12"},"Pesach II":[{k:"II Kings",b:"23:1",e:"23:9"},{k:"II Kings",b:"23:21",e:"23:23"}],"Pesach VII":{k:"II Samuel",b:"22:1",e:"22:19"},"Pesach VII (on Shabbat)":{k:"II Samuel",b:"22:1",e:"22:19"},"Pesach VIII":[{k:"Isaiah",b:"11:1",e:"11:12"},{k:"Isaiah",b:"11:16",e:"11:16"}],"Pesach VIII (on Shabbat)":[{k:"Isaiah",b:"11:1",e:"11:12"},{k:"Isaiah",b:"11:16",e:"11:16"}],"Shavuot II":[{k:"Habakkuk",b:"3:1",e:"3:13"},{k:"Habakkuk",b:"3:18",e:"3:19"}],"Shavuot II (on Shabbat)":[{k:"Habakkuk",b:"3:1",e:"3:13"},{k:"Habakkuk",b:"3:18",e:"3:19"}],"Rosh Hashana II":{k:"Jeremiah",b:"31:2",e:"31:20"},"Yom Kippur":{k:"Isaiah",b:"58:1",e:"58:14"},"Yom Kippur (on Shabbat)":{k:"Isaiah",b:"58:1",e:"58:14"},"Yom Kippur (Mincha, Traditional)":[{k:"Jonah",b:"1:1",e:"4:11"},{k:"Micah",b:"7:18",e:"7:20"}],"Yom Kippur (Mincha, Alternate)":[{k:"Jonah",b:"1:1",e:"4:11"},{k:"Micah",b:"7:18",e:"7:20"}],"Sukkot I":[{k:"Zechariah",b:"14:1",e:"14:9"},{k:"Zechariah",b:"14:16",e:"14:21"}],"Sukkot I (on Shabbat)":[{k:"Zechariah",b:"14:1",e:"14:9"},{k:"Zechariah",b:"14:16",e:"14:21"}],"Sukkot II":{k:"I Kings",b:"8:2",e:"8:13"},"Sukkot Shabbat Chol ha-Moed":{k:"Ezekiel",b:"38:18",e:"39:7"},"Simchat Torah":{k:"Joshua",b:"1:1",e:"1:9"},"Shabbat Chanukah":{k:"Zechariah",b:"3:6",e:"4:7"},"Shabbat Rosh Chodesh Chanukah":{k:"Zechariah",b:"3:6",e:"4:7"},"Shabbat HaChodesh":{k:"Ezekiel",b:"45:16",e:"45:25"},"Shabbat HaChodesh (on Rosh Chodesh)":{k:"Ezekiel",b:"45:16",e:"45:25"},"Shabbat HaGadol":[{k:"Malachi",b:"3:13",e:"3:24"},{k:"Malachi",b:"3:23",e:"3:23"}],"Shabbat Parah":{k:"Ezekiel",b:"36:16",e:"36:38"},"Shabbat Shekalim":{k:"II Kings",b:"12:1",e:"12:17"},"Shabbat Shekalim (on Rosh Chodesh)":{k:"II Kings",b:"12:1",e:"12:17"},"Shabbat Shuva":[{k:"Hosea",b:"14:2",e:"14:10"},{k:"Micah",b:"7:18",e:"7:20"}],"Shabbat Shuva (alt)":{k:"Joel",b:"2:15",e:"2:27"},"Shabbat Zachor":{k:"I Samuel",b:"15:2",e:"15:34"},"Shabbat Rosh Chodesh":[{k:"Isaiah",b:"66:1",e:"66:14"},{k:"Isaiah",b:"66:22",e:"66:24"},{k:"Isaiah",b:"66:23",e:"66:23"}]};var triennialHaft = {Bereshit:Bereshit,Noach:Noach,"Lech-Lecha":{"1":{k:"Judges",b:"6:24",e:"6:32",note:"Gideon smashes dad's idol // Abraham and Terach's idols (midrash)"},"2":{k:"Joshua",b:"10:1",e:"10:14",note:"battle of Giveon // battle of 4/5 kings"},"3":{k:"Isaiah",b:"41:8",e:"41:16",note:"Israel, Abraham's progeny // promise to Abraham"}},Vayera:Vayera,"Chayei Sara":{"1":{k:"Isaiah",b:"51:1",e:"51:11",note:"Sarah and Abraham as models"},"2":{k:"I Samuel",b:"14:1",e:"14:12",note:"Jonathan's sign // Eliezer's sign"},"3":{k:"I Kings",b:"1:11",e:"1:31",note:"David's old age // Abraham's"}},Toldot:Toldot,Vayetzei:Vayetzei,Vayishlach:Vayishlach,Vayeshev:Vayeshev,Miketz:Miketz,Vayigash:Vayigash,Vayechi:Vayechi,Shemot:Shemot,Vaera:Vaera,Bo:Bo,Beshalach:Beshalach,Yitro:Yitro,Mishpatim:Mishpatim,Terumah:Terumah,Tetzaveh:Tetzaveh,"Ki Tisa":{"1":[{k:"Jeremiah",b:"17:19",e:"17:27",note:"re observance of Shabbat"},{k:"Jeremiah",b:"17:24",e:"17:25"}],"2":{k:"I Kings",b:"18:20",e:"18:39",note:"Elijah on Carmel // Golden Calf"},"3":{k:"Isaiah",b:"63:17",e:"64:8",note:"seeking forgiveness // Moses after Golden Calf"}},Vayakhel:Vayakhel,Pekudei:Pekudei,Vayikra:Vayikra,Tzav:Tzav,Shmini:Shmini,Tazria:Tazria,Metzora:Metzora,"Achrei Mot":{"1":{k:"Ezekiel",b:"22:1",e:"22:16",note:"abominations // arayot"},"2":{k:"Ezekiel",b:"20:2",e:"20:20",note:"abominations of Egypt // arayot"}},Kedoshim:Kedoshim,Emor:Emor,Behar:Behar,Bechukotai:Bechukotai,Bamidbar:Bamidbar,Nasso:Nasso,"Beha'alotcha":{"1":[{k:"Zechariah",b:"3:1",e:"3:5",note:"Purifying kohen, Menorah // Menorah, purifying leviim"},{k:"Zechariah",b:"4:1",e:"4:7"}],"2":[{k:"Joshua",b:"3:3",e:"3:8",note:"Ark leads in travel"},{k:"Joshua",b:"3:17",e:" 4:7"}],"3":{k:"II Kings",b:"20:1",e:"20:11",note:"Hezekiah healed thru prayer // Miriam"}},"Sh'lach":{"1":{k:"Joshua",b:"2:1",e:"2:11",note:"spies"},"2":{k:"Joshua",b:"14:6",e:"14:15",note:"Calev's reward"},"3":{k:"I Kings",b:"17:1",e:"17:16",note:"mkosheshet etzim // mkoshesh etzim"}},Korach:Korach,Chukat:Chukat,Balak:Balak,Pinchas:Pinchas,Matot:Matot,Masei:Masei,"Devarim - Isaiah 1:1-27, same as full kriyah":false,"Vaetchanan - Isaiah 40:1-26, same as full kriyah":false,Eikev:Eikev,"Re'eh":{"1":{k:"Isaiah",b:"54:11",e:"55:5**",note:"aniya soarah"},"2":{k:"Isaiah",b:"43:1",e:"43:10",note:"al tira ki g'altikha"},"3":{k:"Isaiah",b:"43:11",e:"43:20",note:"ami v'chiri"}},Shoftim:Shoftim,"Ki Teitzei":{"1":{k:"Isaiah",b:"54:1",e:"54:10",note:"roni akarah"},"2":{k:"Jeremiah",b:"33:1",e:"33:11",note:"kol sason v'kol simchah"},"3":[{k:"Isaiah",b:"48:12",e:"48:21",note:"goalekh k'dosh yisrael"},{k:"Isaiah",b:"4:20",e:"4:20"}]},"Ki Tavo":{"1":{k:"Isaiah",b:"60:1",e:"60:9",note:"kumi ori"},"2":{k:"Isaiah",b:"60:13",e:"60:22",note:"amekh kulam tzadikim"},"3":{k:"Zechariah",b:"8:11",e:"8:22",note:"emet umishpat shalom"}},Nitzavim:Nitzavim,Vayeilech:Vayeilech,"Ha'Azinu":{"1":[{k:"II Samuel",b:"22:1",e:"22:1",note:"David // Moses' song"},{k:"II Samuel",b:"22:31",e:"22:51"}],"2":[{k:"II Samuel",b:"22:1",e:"22:1",note:"David //Moses' song"},{k:"II Samuel",b:"22:19",e:"22:31"}],"3":{k:"Joshua",b:"23:1",e:"23:11",note:"Joshua's farewell"}},"Tish'a B'Av":{"1":[{k:"Jeremiah",b:"8:13",e:"8:23"},{k:"Jeremiah",b:"9:23",e:"9:23"}],"2":[{k:"Jeremiah",b:"9:1",e:"9:10"},{k:"Jeremiah",b:"9:23",e:"9:23"}],"3":{k:"Jeremiah",b:"9:11",e:"9:23"}},_holidays:_holidays};
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/leyning v4.18.1 */
1
+ /*! @hebcal/leyning v4.18.2 */
2
2
  import { parshiot, flags, months, HDate, HebrewCalendar, Event, Locale, ParshaEvent } from '@hebcal/core';
3
3
 
4
4
  const Genesis=[0,31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26];const Exodus=[0,22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38];const Leviticus=[0,17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34];const Numbers=[0,54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13];const Deuteronomy=[0,46,37,29,49,30,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12];const Joshua=[0,18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33];const Judges=[0,36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25];const Ruth=[0,22,23,18,22];const Isaiah=[0,31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24];const Jeremiah=[0,19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34];const Lamentations=[0,22,22,66,22,22];const Baruch=[0,22,35,38,37,9,72];const Ezekiel=[0,28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35];const Daniel=[0,21,49,100,34,30,29,28,27,27,21,45,13,64,42];const Hosea=[0,9,25,5,19,15,11,16,14,17,15,11,15,15,10];const Joel=[0,20,27,5,21];const Amos=[0,15,16,15,13,27,14,17,14,15];const Obadiah=[0,21];const Jonah=[0,16,11,10,11];const Micah=[0,16,13,12,14,14,16,20];const Nachum=[0,14,14,19];const Habakkuk=[0,17,20,19];const Zephaniah=[0,18,15,20];const Haggai=[0,15,23];const Zechariah=[0,17,17,10,14,11,15,14,23,17,12,17,14,9,21];const Malachi=[0,14,17,24];var numverses = {Genesis:Genesis,Exodus:Exodus,Leviticus:Leviticus,Numbers:Numbers,Deuteronomy:Deuteronomy,Joshua:Joshua,Judges:Judges,Ruth:Ruth,"I Samuel":[0,28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,43,25,12,25,11,31,13],"II Samuel":[0,27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],"I Kings":[0,53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],"II Kings":[0,18,25,27,44,27,33,20,29,37,36,20,22,25,29,38,20,41,37,37,21,26,20,37,20,30],Isaiah:Isaiah,Jeremiah:Jeremiah,Lamentations:Lamentations,Baruch:Baruch,Ezekiel:Ezekiel,Daniel:Daniel,Hosea:Hosea,Joel:Joel,Amos:Amos,Obadiah:Obadiah,Jonah:Jonah,Micah:Micah,Nachum:Nachum,Habakkuk:Habakkuk,Zephaniah:Zephaniah,Haggai:Haggai,Zechariah:Zechariah,Malachi:Malachi};
@@ -935,7 +935,8 @@ function getLeyningForParsha(parsha) {
935
935
  return result;
936
936
  }
937
937
  /**
938
- * Looks up leyning for a regular Shabbat parsha.
938
+ * Looks up leyning for a regular Shabbat parsha, including any special
939
+ * maftir or Haftara.
939
940
  * @param {Event} ev the Hebcal event associated with this leyning
940
941
  * @param {boolean} [il] in Israel
941
942
  * @return {Leyning} map of aliyot
@@ -1002,7 +1003,18 @@ function getLeyningForParshaHaShavua(ev, il = false) {
1002
1003
  return result;
1003
1004
  }
1004
1005
  /**
1005
- * Looks up leyning for a regular Shabbat or holiday
1006
+ * Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
1007
+ *
1008
+ * If `hdate` coincides with a holiday that has Torah reading, returns the
1009
+ * reading for that day (see {@link getLeyningForHoliday})
1010
+ *
1011
+ * Otherwise, if `hdate` is a Saturday, returns {@link getLeyningForParshaHaShavua}
1012
+ *
1013
+ * Otherwise, if `hdate` is a Monday or Thursday, returns {@link Leyning} for the
1014
+ * Parashat haShavua, containing only the `weekday` aliyot (no `fullkriyah`).
1015
+ *
1016
+ * Otherwise, returns `undefined`.
1017
+ *
1006
1018
  * @param {HDate} hdate Hebrew Date
1007
1019
  * @param {boolean} il in Israel
1008
1020
  * @return {Leyning} map of aliyot
@@ -1021,8 +1033,21 @@ function getLeyningOnDate(hdate, il) {
1021
1033
 
1022
1034
  const events = HebrewCalendar.getHolidaysOnDate(hdate, il);
1023
1035
 
1024
- if (!events && (dow === 1 || dow === 4)) {
1025
- const reading = getLeyningForParsha(parsha.parsha);
1036
+ if (events) {
1037
+ const reading = getLeyningForHoliday(events[0], il);
1038
+
1039
+ if (reading) {
1040
+ return reading;
1041
+ } else if (dow !== 1 && dow !== 4) {
1042
+ return undefined; // today is a non-reading holiday
1043
+ } // otherwise continue below for Mon/Thu
1044
+
1045
+ }
1046
+
1047
+ if (dow === 1 || dow === 4) {
1048
+ const saturday = hdate.onOrAfter(6);
1049
+ const parsha2 = findParshaHaShavua(saturday);
1050
+ const reading = getLeyningForParsha(parsha2.parsha);
1026
1051
  const result = {
1027
1052
  name: reading.name,
1028
1053
  parsha: reading.parsha,
@@ -1030,9 +1055,43 @@ function getLeyningOnDate(hdate, il) {
1030
1055
  weekday: reading.weekday
1031
1056
  };
1032
1057
  return result;
1058
+ } // no reading today: it's not Shabbat, Mon/Thu, or a Torah-reading holiday
1059
+
1060
+
1061
+ return undefined;
1062
+ }
1063
+ /**
1064
+ * @private
1065
+ * @param {HDate} saturday
1066
+ * @param {boolean} il
1067
+ * @return {Leyning}
1068
+ */
1069
+
1070
+ function findParshaHaShavua(saturday, il) {
1071
+ const hyear = saturday.getFullYear();
1072
+ const sedra = HebrewCalendar.getSedra(hyear, il);
1073
+ const parsha = sedra.lookup(saturday);
1074
+
1075
+ if (!parsha.chag) {
1076
+ return parsha;
1077
+ } // Search for next regular parsha, which could even spill into next year
1078
+
1079
+
1080
+ const endOfYear = new HDate(1, months.TISHREI, hyear + 1).abs() - 1;
1081
+ const endAbs = endOfYear + 30;
1082
+
1083
+ for (let sat2 = saturday.abs() + 7; sat2 <= endAbs; sat2 += 7) {
1084
+ const sedra2 = sat2 > endOfYear ? HebrewCalendar.getSedra(hyear + 1, il) : sedra;
1085
+ const parsha2 = sedra2.lookup(sat2);
1086
+
1087
+ if (!parsha2.chag) {
1088
+ return parsha2;
1089
+ }
1033
1090
  }
1091
+ /* NOTREACHED */
1092
+
1034
1093
 
1035
- return events ? getLeyningForHoliday(events[0], il) : undefined;
1094
+ return null;
1036
1095
  }
1037
1096
 
1038
1097
  const Bereshit={"1":{k:"Isaiah",b:"42:5",e:"42:21",note:"God identified as the creator // Creation"},"2":{k:"Isaiah",b:"40:25",e:"40:31",note:"God created, called by name // Eden"},"3":{k:"II Kings",b:"2:1",e:"2:13",note:"Elijah taken // Hanokh"}};const Noach={"1":{k:"Isaiah",b:"54:11",e:"55:5",note:"Storm tossed boat // Ark"},"2":{k:"Isaiah",b:"54:1",e:"54:10",note:"waters of Noah no more"},"3":{k:"Zephaniah",b:"3:9",e:"3:20",note:"one language // babel"}};const Vayera={"1":{k:"II Kings",b:"4:8",e:"4:17",note:"birth of promised child // promise to Sarah"},"2":{k:"II Kings",b:"6:8",e:"6:23",note:"blinding episode // Sodom"},"3":{k:"II Kings",b:"4:18",e:"4:36",note:"saving of child // akedah"}};const Toldot={"1":{k:"Malachi",b:"1:1",e:"1:14",note:"Jacob / Esau"},"2":{k:"II Samuel",b:"19:32",e:"19:40",note:"Barzilay infirm in old age // Isaac"},"3":[{k:"Judges",b:"3:15",e:"3:27",note:"Ehud's ploy // Jacob's ploy"},{k:"Judges",b:"3:30",e:"3:30"}]};const Vayetzei={"1":{k:"Hosea",b:"12:3",e:"12:14",note:"Jacob story"},"2":{k:"Zechariah",b:"1:7",e:"1:17",note:"striped horses //streaked sheep"},"3":{k:"I Samuel",b:"19:11",e:"19:18",note:"deceit / terafim / female wiles // Rachel hides terafim"}};const Vayishlach={"1":[{k:"Obadiah",b:"1:10",e:"1:18",note:"Jacob defeats Edom (Babylon) // Jacob meets Esau"},{k:"Obadiah",b:"1:21",e:"1:21"}],"2":{k:"Jeremiah",b:"30:10",e:"30:22",note:"Jacob will return, settle // Jacob's early settling in Shechem and Bet El"},"3":[{k:"Amos",b:"1:1",e:"1:1",note:"prophecy against Edom // genealogy of Edom"},{k:"Amos",b:"1:11",e:"2:3"}]};const Vayeshev={"1":[{k:"Amos",b:"2:6",e:"3:2",note:"reference to sale of righteous // sale of Joseph"},{k:"Amos",b:"3:7",e:"3:8"}],"2":{k:"I Samuel",b:"24:2",e:"24:15",note:"recognition of significant object David to Saul // Tamar to Judah"},"3":{k:"Judges",b:"7:9",e:"7:20",note:"Gideon dream interpretation // Joseph's in jail"}};const Miketz={"1":{k:"I Kings",b:"3:5",e:"3:15",note:"Solomon's dream // Pharaoh's dream"},"2":{k:"I Kings",b:"3:16",e:"4:1",note:"Solomon's wisdom // Joseph's"},"3":{k:"I Kings",b:"10:1",e:"10:9",note:"Solomon's wisdom and household // Joseph's"}};const Vayigash={"1":{k:"Ezekiel",b:"37:15",e:"37:28",note:"Judah and Joseph united"},"2":{k:"Zechariah",b:"10:3",e:"10:12",note:"Judah and Joseph, return from Egypt // J & J, brothers return to Jacob"},"3":{k:"Isaiah",b:"41:1",e:"41:10",note:"brother helps / Jacob not fear // Joseph settles his family in Goshen"}};const Vayechi={"1":{k:"Amos",b:"5:4",e:"5:15",note:"prophecy to remnants of Joseph // Joseph and kids"},"2":{k:"I Kings",b:"2:1",e:"2:12",note:"David's // Jacob's last speech"},"3":[{k:"II Samuel",b:"1:12",e:"1:12",note:"(lament over) deaths of Saul and Jonathan // deaths of Jacob, Joseph"},{k:"II Samuel",b:"1:17",e:"1:27"}]};const Shemot={"1":[{k:"Isaiah",b:"27:6",e:"27:13",note:"growth of Jacob / Israel // Israel in Egypt"},{k:"Isaiah",b:"29:22",e:"29:23"}],"2":[{k:"Joshua",b:"5:13",e:"6:5",note:"Joshua shoes off // burning bush"},{k:"Joshua",b:"6:15",e:"6:16"}],"3":[{k:"I Samuel",b:"9:15",e:"9:21",note:"anointing of Saul // Moses"},{k:"I Samuel",b:"9:27",e:"10:1"}]};const Vaera={"1":[{k:"Jeremiah",b:"1:1",e:"1:10",note:"appointment of Jeremiah // Moses"},{k:"Jeremiah",b:"1:8",e:"1:8"}],"2":[{k:"Ezekiel",b:"28:25",e:"29:12",note:"Speak to Pharaoh, show Egypt, strike Nile"},{k:"Ezekiel",b:"29:21",e:"29:21"}],"3":[{k:"Isaiah",b:"10:12",e:"10:12",note:"smite Assyria as Egypt"},{k:"Isaiah",b:"10:15",e:"10:26"},{k:"Isaiah",b:"10:32",e:"10:33"}]};const Bo={"1":{k:"Jeremiah",b:"10:1",e:"10:10",note:"goyim will fear signs from heaven // plagues"},"2":{k:"Jeremiah",b:"46:13",e:"46:28",note:"Egypt's fall / Israel's redemption // Exodus"},"3":{k:"II Samuel",b:"7:18",e:"7:29",note:"David recalls Exodus"}};const Beshalach={"1":{k:"Judges",b:"4:4",e:"4:24",note:"defeat of Sisera // defeat of Pharaoh"},"2":{k:"Judges",b:"5:1",e:"5:31",note:"Deborah's song // Moses' song of sea"},"3":[{k:"Joshua",b:"3:9",e:"3:17",note:"splitting Jordan, crossing on dry land // splitting Red Sea"},{k:"Joshua",b:"4:19",e:"4:24"}]};const Yitro={"1":{k:"Isaiah",b:"6:1",e:"6:13",note:"Isaiah's revelation of God // Moses' revelation at Sinai"},"2":{k:"Isaiah",b:"44:9",e:"44:23",note:"making idols to false god // you shall have no other Gods"},"3":{k:"Ezekiel",b:"16:4",e:"16:14",note:"Israel's birth / covenant / marriage(?) // revelation at Sinai"}};const Mishpatim={"1":[{k:"Jeremiah",b:"34:12",e:"34:22",note:"Jeremiah refers to the law that followed the covenant // Mishpatim"},{k:"Jeremiah",b:"33:25",e:"33:26"}],"2":{k:"I Samuel",b:"18:20",e:"18:28",note:"Michal's bride price // a law of Mishpatim"},"3":{k:"Joshua",b:"24:16",e:"24:28",note:"Joshua's covenant // na'aseh v'nishma"}};const Terumah={"1":{k:"Zechariah",b:"2:5",e:"2:17",note:"God's presence in Israelvshakhanti b'tokhekh"},"2":{k:"I Kings",b:"6:1",e:"6:13",note:"Temple // Tabernacle"},"3":{k:"II Samuel",b:"7:1",e:"7:16",note:"Temple // Tabernacle"}};const Tetzaveh={"1":{k:"Ezekiel",b:"43:10",e:"43:17",note:"Temple // Tabernacle"},"2":{k:"Haggai",b:"1:1",e:"1:12",note:"T / T"},"3":{k:"Haggai",b:"2:1",e:"2:9",note:"T / T"}};const Vayakhel={"1":{k:"I Kings",b:"7:40",e:"7:50",note:"T / T"},"2":{k:"I Kings",b:"7:13",e:"7:26",note:"T / T"},"3":{k:"Ezekiel",b:"43:1",e:"43:9",note:"T / T"}};const Pekudei={"1":{k:"I Kings",b:"8:1",e:"8:11",note:"T / T"},"2":{k:"I Kings",b:"8:10",e:"8:21",note:"T / T"},"3":{k:"I Kings",b:"8:22",e:"8:39",note:"T / T"}};const Vayikra={"1":{k:"Isaiah",b:"43:21",e:"44:8",note:"sacrifices"},"2":{k:"I Samuel",b:"2:13",e:"2:26",note:"misbehaving kohanim // if a priest sins"},"3":{k:"Malachi",b:"2:13",e:"3:4",note:"sinfulness ruins offering // sin offerings"}};const Tzav={"1":[{k:"Jeremiah",b:"7:21",e:"7:28",note:"justice over sacrifices // sacrifices at Tabernacle"},{k:"Jeremiah",b:"9:22",e:"9:23"}],"2":{k:"Jeremiah",b:"33:14",e:"33:22",note:"priests offer sacrifices // sacrifices at Tabernacle"},"3":{k:"Ezekiel",b:"42:13",e:"42:20",note:"priestly precincts / clothes // priestly vestments"}};const Shmini={"1":{k:"II Samuel",b:"6:1",e:"6:15",note:"Uzza struck down // Nadav and Avihu"},"2":{k:"Ezekiel",b:"43:18",e:"43:27",note:"8th day sacrifices"},"3":{k:"Hosea",b:"9:1",e:"9:9",note:"Israel has eaten non-kosher // kashrut rules"}};const Tazria={"1":{k:"Isaiah",b:"46:3",e:"46:13",note:"since birth // birth"},"2":{k:"Jeremiah",b:"30:1",e:"30:9",note:"im yoled zakhar // v'yaldah zakhar"}};const Metzora={"1":{k:"II Kings",b:"5:1",e:"5:14",note:"Healing of a leper"},"2":{k:"II Kings",b:"7:3",e:"7:16",note:"4 lepers discover Aram's flight"},"3":{k:"II Kings",b:"5:20",e:"5:27",note:"Gechazi gets leprosy"}};const Kedoshim={"1":{k:"Isaiah",b:"61:1",e:"61:9",note:"you shall be called Priests // kedoshim"},"2":{k:"Amos",b:"9:7",e:"9:15",note:"opposite of chosenness"},"3":{k:"Hosea",b:"4:1",e:"4:15",note:"opposite of holiness / niuf // kedoshim, arayot"}};const Emor={"1":{k:"Ezekiel",b:"44:15",e:"44:24",note:"the conduct of kohanim"},"2":[{k:"Malachi",b:"2:1",e:"2:10",note:"conduct of kohanim / chillul hashem // particularly vs. 22:31-32"},{k:"Malachi",b:"2:7",e:"2:7"}],"3":[{k:"Nachum",b:"1:1",e:"1:7",note:"Judah shall observe its festivals // complete festival calendar"},{k:"Nachum",b:"2:1",e:"2:3"},{k:"Nachum",b:"2:2b",e:"2:3a"}]};const Behar={"1":{k:"Jeremiah",b:"32:6",e:"32:15",note:"land redemption // shmittah"},"2":{k:"Jeremiah",b:"32:16",e:"32:27",note:"prayerwill Israel ever redeem its land // shmittah"}};const Bechukotai={"1":{k:"Jeremiah",b:"17:1",e:"17:14",note:"blessings and curses // tokhechah"},"2":[{k:"Jeremiah",b:"16:9",e:"16:15",note:"desolation and redemption // tokhechah"},{k:"Jeremiah",b:"16:19",e:"16:21"}],"3":{k:"Malachi",b:"3:5",e:"3:12",note:"curses and blessings // tokhechah"}};const Bamidbar={"1":[{k:"Hosea",b:"2:1",e:"2:7",note:"number, lead thru desert as after Egypt // census, desert wanderings"},{k:"Hosea",b:"2:16",e:"2:22"}],"2":{k:"Isaiah",b:"63:7",e:"63:16",note:"God carries us as in desert // desert wanderings"},"3":[{k:"Joshua",b:"8:30",e:"8:35",note:"kohanim who carried the ark // korachites"},{k:"Joshua",b:"8:33",e:"8:33"}]};const Nasso={"1":[{k:"Joshua",b:"6:5",e:"6:14",note:"kohanim carrying ark // gershunites and merarites"},{k:"Joshua",b:"6:12",e:"6:12"}],"2":[{k:"Judges",b:"13:2",e:"13:14",note:"Samson // nazirite rules"},{k:"Judges",b:"13:24",e:"13:25"}],"3":[{k:"Joel",b:"1:8",e:"1:13",note:"end of sacrifices, hope for restart // dedication of Tabernacle"},{k:"Joel",b:"2:12",e:"2:14"}]};const Korach={"1":{k:"I Samuel",b:"12:1",e:"12:13",note:"Samuel's apologia references Moses leadership // Moses'"},"2":{k:"I Samuel",b:"12:13",e:"12:22",note:"appointing non-prophet as leader // Korach's rebellion"},"3":{k:"Ezekiel",b:"45:1",e:"45:15",note:"portion of kohen and levi"}};const Chukat={"1":{k:"Judges",b:"15:9",e:"15:20",note:"Samson gets miraculous water from split ground // splitting rock"},"2":{k:"Judges",b:"11:12",e:"11:27",note:"journey across Moav recalled"},"3":[{k:"II Kings",b:"18:1",e:"18:13",note:"Hezekiah destroys nachash n'choshet // Moses builds nachash n'choshet"},{k:"II Kings",b:"19:15",e:"19:19"}]};const Balak={"1":{k:"Micah",b:"6:1",e:"6:8",note:"events of Balak recalled"},"2":{k:"Micah",b:"5:1",e:"5:8",note:"she'erit Yaakov described // Bila'am's blessing"},"3":{k:"Joshua",b:"24:1",e:"24:14",note:"history mentions Balak"}};const Pinchas={"1":{k:"I Kings",b:"19:1",e:"19:16",note:"Elijah's zeal // Pinchas"},"2":[{k:"Joshua",b:"17:1",e:"17:6",note:"Bnot Tzlofhad"},{k:"Joshua",b:"17:17",e:"17:18"}],"3":{k:"Ezekiel",b:"46:1",e:"46:11",note:"sacrifices on Shabbat and holidays // detailed festival sacrifices"}};const Matot={"1":{k:"Jeremiah",b:"1:11",e:"2:3",note:"miztafon tipatach hara'ah"},"2":{k:"II Kings",b:"22:8",e:"22:19",note:"hinneni mevi ra'ah (Hezekiah's discovered book of Torah)"},"3":{k:"Jeremiah",b:"14:11",e:"14:22",note:"ki yatzumu, eineni shomea"}};const Masei={"1":[{k:"Jeremiah",b:"2:4",e:"2:13",note:"shtayim ra'ot asah ami"},{k:"Jeremiah",b:"4:1",e:"4:2"}],"2":[{k:"Jeremiah",b:"2:14",e:"2:28",note:"ra vamar ozvekh"},{k:"Jeremiah",b:"3:4",e:"3:4"}],"3":[{k:"I Kings",b:"9:2",e:"9:9",note:"l'mashal v'lishninah"},{k:"I Kings",b:"9:4",e:"9:5a"}]};const Eikev={"1":{k:"Isaiah",b:"49:14",e:"49:26",note:"ani moshiekh"},"2":{k:"Isaiah",b:"50:1",e:"51:3",note:"sason v'simcha yimatze"},"3":{k:"Zechariah",b:"8:1",e:"8:8",note:"be'emet u-vitzdakah"}};const Shoftim={"1":[{k:"Isaiah",b:"51:12",e:"51:23",note:"anokhi anokhi"},{k:"Isaiah",b:"51:22",e:"51:22"}],"2":{k:"Isaiah",b:"52:1",e:"52:12",note:"uri uri"},"3":{k:"Isaiah",b:"44:24",e:"45:7",note:"l'ma'an avdi"}};const Nitzavim={"1":{k:"Isaiah",b:"61:10",e:"62:12",note:"sos asis"},"2":{k:"Isaiah",b:"63:1",e:"63:9",note:"tzaratam lo tzar"},"3":{k:"Isaiah",b:"65:16",e:"65:25",note:"terem yikrau ani e'eneh"}};const Vayeilech={"1":{k:"Isaiah",b:"61:10",e:"62:12",note:"sos asis"},"2":{k:"Isaiah",b:"63:1",e:"63:9",note:"tzaratam lo tzar"},"3":{k:"Isaiah",b:"65:16",e:"65:25",note:"terem yikrau ani e'eneh"}};const _holidays={"Pesach I":{k:"Joshua",b:"5:2",e:"5:12"},"Pesach I (on Shabbat)":{k:"Joshua",b:"5:2",e:"5:12"},"Pesach II":[{k:"II Kings",b:"23:1",e:"23:9"},{k:"II Kings",b:"23:21",e:"23:23"}],"Pesach VII":{k:"II Samuel",b:"22:1",e:"22:19"},"Pesach VII (on Shabbat)":{k:"II Samuel",b:"22:1",e:"22:19"},"Pesach VIII":[{k:"Isaiah",b:"11:1",e:"11:12"},{k:"Isaiah",b:"11:16",e:"11:16"}],"Pesach VIII (on Shabbat)":[{k:"Isaiah",b:"11:1",e:"11:12"},{k:"Isaiah",b:"11:16",e:"11:16"}],"Shavuot II":[{k:"Habakkuk",b:"3:1",e:"3:13"},{k:"Habakkuk",b:"3:18",e:"3:19"}],"Shavuot II (on Shabbat)":[{k:"Habakkuk",b:"3:1",e:"3:13"},{k:"Habakkuk",b:"3:18",e:"3:19"}],"Rosh Hashana II":{k:"Jeremiah",b:"31:2",e:"31:20"},"Yom Kippur":{k:"Isaiah",b:"58:1",e:"58:14"},"Yom Kippur (on Shabbat)":{k:"Isaiah",b:"58:1",e:"58:14"},"Yom Kippur (Mincha, Traditional)":[{k:"Jonah",b:"1:1",e:"4:11"},{k:"Micah",b:"7:18",e:"7:20"}],"Yom Kippur (Mincha, Alternate)":[{k:"Jonah",b:"1:1",e:"4:11"},{k:"Micah",b:"7:18",e:"7:20"}],"Sukkot I":[{k:"Zechariah",b:"14:1",e:"14:9"},{k:"Zechariah",b:"14:16",e:"14:21"}],"Sukkot I (on Shabbat)":[{k:"Zechariah",b:"14:1",e:"14:9"},{k:"Zechariah",b:"14:16",e:"14:21"}],"Sukkot II":{k:"I Kings",b:"8:2",e:"8:13"},"Sukkot Shabbat Chol ha-Moed":{k:"Ezekiel",b:"38:18",e:"39:7"},"Simchat Torah":{k:"Joshua",b:"1:1",e:"1:9"},"Shabbat Chanukah":{k:"Zechariah",b:"3:6",e:"4:7"},"Shabbat Rosh Chodesh Chanukah":{k:"Zechariah",b:"3:6",e:"4:7"},"Shabbat HaChodesh":{k:"Ezekiel",b:"45:16",e:"45:25"},"Shabbat HaChodesh (on Rosh Chodesh)":{k:"Ezekiel",b:"45:16",e:"45:25"},"Shabbat HaGadol":[{k:"Malachi",b:"3:13",e:"3:24"},{k:"Malachi",b:"3:23",e:"3:23"}],"Shabbat Parah":{k:"Ezekiel",b:"36:16",e:"36:38"},"Shabbat Shekalim":{k:"II Kings",b:"12:1",e:"12:17"},"Shabbat Shekalim (on Rosh Chodesh)":{k:"II Kings",b:"12:1",e:"12:17"},"Shabbat Shuva":[{k:"Hosea",b:"14:2",e:"14:10"},{k:"Micah",b:"7:18",e:"7:20"}],"Shabbat Shuva (alt)":{k:"Joel",b:"2:15",e:"2:27"},"Shabbat Zachor":{k:"I Samuel",b:"15:2",e:"15:34"},"Shabbat Rosh Chodesh":[{k:"Isaiah",b:"66:1",e:"66:14"},{k:"Isaiah",b:"66:22",e:"66:24"},{k:"Isaiah",b:"66:23",e:"66:23"}]};var triennialHaft = {Bereshit:Bereshit,Noach:Noach,"Lech-Lecha":{"1":{k:"Judges",b:"6:24",e:"6:32",note:"Gideon smashes dad's idol // Abraham and Terach's idols (midrash)"},"2":{k:"Joshua",b:"10:1",e:"10:14",note:"battle of Giveon // battle of 4/5 kings"},"3":{k:"Isaiah",b:"41:8",e:"41:16",note:"Israel, Abraham's progeny // promise to Abraham"}},Vayera:Vayera,"Chayei Sara":{"1":{k:"Isaiah",b:"51:1",e:"51:11",note:"Sarah and Abraham as models"},"2":{k:"I Samuel",b:"14:1",e:"14:12",note:"Jonathan's sign // Eliezer's sign"},"3":{k:"I Kings",b:"1:11",e:"1:31",note:"David's old age // Abraham's"}},Toldot:Toldot,Vayetzei:Vayetzei,Vayishlach:Vayishlach,Vayeshev:Vayeshev,Miketz:Miketz,Vayigash:Vayigash,Vayechi:Vayechi,Shemot:Shemot,Vaera:Vaera,Bo:Bo,Beshalach:Beshalach,Yitro:Yitro,Mishpatim:Mishpatim,Terumah:Terumah,Tetzaveh:Tetzaveh,"Ki Tisa":{"1":[{k:"Jeremiah",b:"17:19",e:"17:27",note:"re observance of Shabbat"},{k:"Jeremiah",b:"17:24",e:"17:25"}],"2":{k:"I Kings",b:"18:20",e:"18:39",note:"Elijah on Carmel // Golden Calf"},"3":{k:"Isaiah",b:"63:17",e:"64:8",note:"seeking forgiveness // Moses after Golden Calf"}},Vayakhel:Vayakhel,Pekudei:Pekudei,Vayikra:Vayikra,Tzav:Tzav,Shmini:Shmini,Tazria:Tazria,Metzora:Metzora,"Achrei Mot":{"1":{k:"Ezekiel",b:"22:1",e:"22:16",note:"abominations // arayot"},"2":{k:"Ezekiel",b:"20:2",e:"20:20",note:"abominations of Egypt // arayot"}},Kedoshim:Kedoshim,Emor:Emor,Behar:Behar,Bechukotai:Bechukotai,Bamidbar:Bamidbar,Nasso:Nasso,"Beha'alotcha":{"1":[{k:"Zechariah",b:"3:1",e:"3:5",note:"Purifying kohen, Menorah // Menorah, purifying leviim"},{k:"Zechariah",b:"4:1",e:"4:7"}],"2":[{k:"Joshua",b:"3:3",e:"3:8",note:"Ark leads in travel"},{k:"Joshua",b:"3:17",e:" 4:7"}],"3":{k:"II Kings",b:"20:1",e:"20:11",note:"Hezekiah healed thru prayer // Miriam"}},"Sh'lach":{"1":{k:"Joshua",b:"2:1",e:"2:11",note:"spies"},"2":{k:"Joshua",b:"14:6",e:"14:15",note:"Calev's reward"},"3":{k:"I Kings",b:"17:1",e:"17:16",note:"mkosheshet etzim // mkoshesh etzim"}},Korach:Korach,Chukat:Chukat,Balak:Balak,Pinchas:Pinchas,Matot:Matot,Masei:Masei,"Devarim - Isaiah 1:1-27, same as full kriyah":false,"Vaetchanan - Isaiah 40:1-26, same as full kriyah":false,Eikev:Eikev,"Re'eh":{"1":{k:"Isaiah",b:"54:11",e:"55:5**",note:"aniya soarah"},"2":{k:"Isaiah",b:"43:1",e:"43:10",note:"al tira ki g'altikha"},"3":{k:"Isaiah",b:"43:11",e:"43:20",note:"ami v'chiri"}},Shoftim:Shoftim,"Ki Teitzei":{"1":{k:"Isaiah",b:"54:1",e:"54:10",note:"roni akarah"},"2":{k:"Jeremiah",b:"33:1",e:"33:11",note:"kol sason v'kol simchah"},"3":[{k:"Isaiah",b:"48:12",e:"48:21",note:"goalekh k'dosh yisrael"},{k:"Isaiah",b:"4:20",e:"4:20"}]},"Ki Tavo":{"1":{k:"Isaiah",b:"60:1",e:"60:9",note:"kumi ori"},"2":{k:"Isaiah",b:"60:13",e:"60:22",note:"amekh kulam tzadikim"},"3":{k:"Zechariah",b:"8:11",e:"8:22",note:"emet umishpat shalom"}},Nitzavim:Nitzavim,Vayeilech:Vayeilech,"Ha'Azinu":{"1":[{k:"II Samuel",b:"22:1",e:"22:1",note:"David // Moses' song"},{k:"II Samuel",b:"22:31",e:"22:51"}],"2":[{k:"II Samuel",b:"22:1",e:"22:1",note:"David //Moses' song"},{k:"II Samuel",b:"22:19",e:"22:31"}],"3":{k:"Joshua",b:"23:1",e:"23:11",note:"Joshua's farewell"}},"Tish'a B'Av":{"1":[{k:"Jeremiah",b:"8:13",e:"8:23"},{k:"Jeremiah",b:"9:23",e:"9:23"}],"2":[{k:"Jeremiah",b:"9:1",e:"9:10"},{k:"Jeremiah",b:"9:23",e:"9:23"}],"3":{k:"Jeremiah",b:"9:11",e:"9:23"}},_holidays:_holidays};
package/leyning.d.ts CHANGED
@@ -61,7 +61,17 @@ declare module '@hebcal/leyning' {
61
61
  };
62
62
 
63
63
  /**
64
- * Looks up leyning for a regular Shabbat or holiday
64
+ * Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
65
+ *
66
+ * If `hdate` coincides with a holiday that has Torah reading, returns the
67
+ * reading for that day (see {@link getLeyningForHoliday})
68
+ *
69
+ * Otherwise, if `hdate` is a Saturday, returns {@link getLeyningForParshaHaShavua}
70
+ *
71
+ * Otherwise, if `hdate` is a Monday or Thursday, returns {@link Leyning} for the
72
+ * Parashat haShavua, containing only the `weekday` aliyot (no `fullkriyah`).
73
+ *
74
+ * Otherwise, returns `undefined`.
65
75
  * @param hdate Hebrew Date
66
76
  * @param il in Israel
67
77
  * @returns map of aliyot
@@ -93,20 +103,20 @@ declare module '@hebcal/leyning' {
93
103
 
94
104
  /**
95
105
  * Based on the event date, type and title, finds the relevant leyning key
96
- * @param e - event
106
+ * @param ev - the Hebcal holiday event
97
107
  * @param [il] - true if Israel holiday scheme
98
108
  * @returns key to look up in holiday-reading.json
99
109
  */
100
- export function getLeyningKeyForEvent(e: Event, il?: boolean): string;
110
+ export function getLeyningKeyForEvent(ev: Event, il?: boolean): string;
101
111
 
102
112
  /**
103
113
  * Looks up leyning for a given holiday. Returns some
104
114
  * of full kriyah aliyot, special Maftir, special Haftarah
105
- * @param e - the Hebcal event associated with this leyning
115
+ * @param ev - the Hebcal event associated with this leyning
106
116
  * @param [il] - true if Israel holiday scheme
107
117
  * @returns map of aliyot
108
118
  */
109
- export function getLeyningForHoliday(e: Event, il?: boolean): Leyning;
119
+ export function getLeyningForHoliday(ev: Event, il?: boolean): Leyning;
110
120
 
111
121
  /**
112
122
  * Looks up leyning for a given holiday key. Key should be an
@@ -118,12 +128,13 @@ declare module '@hebcal/leyning' {
118
128
  export function getLeyningForHolidayKey(key: string): Leyning;
119
129
 
120
130
  /**
121
- * Looks up leyning for a regular Shabbat parsha.
122
- * @param e - the Hebcal event associated with this leyning
131
+ * Looks up leyning for a regular Shabbat parsha, including any special
132
+ * maftir or Haftara.
133
+ * @param ev - the Hebcal event associated with this leyning
123
134
  * @param [il] - in Israel
124
135
  * @returns map of aliyot
125
136
  */
126
- export function getLeyningForParshaHaShavua(e: Event, il?: boolean): Leyning;
137
+ export function getLeyningForParshaHaShavua(ev: Event, il?: boolean): Leyning;
127
138
 
128
139
  /**
129
140
  * Looks up regular leyning for a weekly parsha with no special readings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/leyning",
3
- "version": "4.18.1",
3
+ "version": "4.18.2",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal",