jcal-zmanim 1.2.7 → 1.2.9

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.cjs CHANGED
@@ -2195,9 +2195,12 @@ var jDate = /*#__PURE__*/ function() {
2195
2195
  }
2196
2196
  },
2197
2197
  {
2198
- /**Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו.*/ key: "toStringHeb",
2199
- value: function toStringHeb() {
2200
- return DaysOfWeekHeb[this.getDayOfWeek()] + " " + Utils.toJewishNumber(this.Day) + " " + JewishMonthsHeb[this.Month] + (this.Month === 12 && _jDate.isJdLeapY(this.Year) ? " ראשון " : " ") + Utils.toJewishNumber(this.Year % 1e3);
2198
+ /**
2199
+ * Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו
2200
+ * @param hideDayOfWeek When set to truthy, hides the day of the week
2201
+ */ key: "toStringHeb",
2202
+ value: function toStringHeb(hideDayOfWeek) {
2203
+ return (!hideDayOfWeek ? DaysOfWeekHeb[this.getDayOfWeek()] + " " : "") + Utils.toJewishNumber(this.Day) + " " + JewishMonthsHeb[this.Month] + (this.Month === 12 && _jDate.isJdLeapY(this.Year) ? " ראשון " : " ") + Utils.toJewishNumber(this.Year % 1e3);
2201
2204
  }
2202
2205
  },
2203
2206
  {
@@ -12608,7 +12611,7 @@ function getWeekDayNotifications() {
12608
12611
  function getAroundTheYearNotifications() {
12609
12612
  var month = dayInfo.month, day = dayInfo.day, isNightTime = dayInfo.isNightTime, dow = dayInfo.dow, isAfternoon = dayInfo.isAfternoon, isDaytime = dayInfo.isDaytime, isMorning = dayInfo.isMorning, isAfterChatzosHalayla = dayInfo.isAfterChatzosHalayla, jdate = dayInfo.jdate, isLeapYear = dayInfo.isLeapYear, location = dayInfo.location;
12610
12613
  switch(month){
12611
- case 1:
12614
+ case JewishMonthsNames.NISSAN:
12612
12615
  dayInfo.noTachnun = true;
12613
12616
  if (day > 15) {
12614
12617
  addTefillahNote("Morid Hatal", "מוריד הטל");
@@ -12739,7 +12742,7 @@ function getAroundTheYearNotifications() {
12739
12742
  addTefillahNote("Shir Hashirim", "מגילת שיר השירים");
12740
12743
  }
12741
12744
  break;
12742
- case 2:
12745
+ case JewishMonthsNames.IYAR:
12743
12746
  if (day <= 15) {
12744
12747
  addTefillahNote("Morid Hatal", "מוריד הטל");
12745
12748
  if (dow !== DaysOfWeek.SHABBOS) {
@@ -12757,7 +12760,7 @@ function getAroundTheYearNotifications() {
12757
12760
  addTefillahNote("Avinu Malkeinu", "אבינו מלכנו");
12758
12761
  }
12759
12762
  break;
12760
- case 3:
12763
+ case JewishMonthsNames.SIVAN:
12761
12764
  if (day < 13) {
12762
12765
  dayInfo.noTachnun = true;
12763
12766
  }
@@ -12789,7 +12792,7 @@ function getAroundTheYearNotifications() {
12789
12792
  }
12790
12793
  }
12791
12794
  break;
12792
- case 4:
12795
+ case JewishMonthsNames.TAMUZ:
12793
12796
  if (isDaytime && (day === 17 && DaysOfWeek.SHABBOS !== 6 || day === 18 && dow === DaysOfWeek.SUNDAY)) {
12794
12797
  if (isDaytime) {
12795
12798
  addDayNote("Shiva Asar B`Tamuz", 'י"ז בתמוז');
@@ -12801,7 +12804,7 @@ function getAroundTheYearNotifications() {
12801
12804
  }
12802
12805
  }
12803
12806
  break;
12804
- case 5:
12807
+ case JewishMonthsNames.AV:
12805
12808
  if (isAfternoon && day === 8 && dow !== DaysOfWeek.FRIDAY) {
12806
12809
  dayInfo.noTachnun = true;
12807
12810
  } else if (day === 9 && dow !== DaysOfWeek.SHABBOS || day === 10 && dow === DaysOfWeek.SUNDAY) {
@@ -12826,7 +12829,7 @@ function getAroundTheYearNotifications() {
12826
12829
  dayInfo.noTachnun = true;
12827
12830
  }
12828
12831
  break;
12829
- case 6:
12832
+ case JewishMonthsNames.ELLUL:
12830
12833
  addTefillahNote("L`Dovid Hashem Ori", "לדוד ה");
12831
12834
  if (day > 20 && dow !== DaysOfWeek.SHABBOS && (isAfterChatzosHalayla || isMorning)) {
12832
12835
  var startedSelichos = day >= 26;
@@ -12852,7 +12855,7 @@ function getAroundTheYearNotifications() {
12852
12855
  dayInfo.noTachnun = true;
12853
12856
  }
12854
12857
  break;
12855
- case 7:
12858
+ case JewishMonthsNames.TISHREI:
12856
12859
  if (day < 11) {
12857
12860
  addTefillahNote("Hamelech Hakadosh", "המלך הקדוש");
12858
12861
  if (dow !== DaysOfWeek.SHABBOS && day !== 9) {
@@ -13105,7 +13108,7 @@ function getAroundTheYearNotifications() {
13105
13108
  addTefillahNote("Mashiv Haruach U`Morid Hageshem", "משיב הרוח ומוריד הגשם");
13106
13109
  }
13107
13110
  break;
13108
- case 8:
13111
+ case JewishMonthsNames.CHESHVAN:
13109
13112
  if (isDaytime && (dow === DaysOfWeek.MONDAY && day > 3 && day < 13 || dow === DaysOfWeek.THURSDAY && day > 6 && day < 14 || dow === DaysOfWeek.MONDAY && day > 10 && day < 18)) {
13110
13113
  addTefillahNote("Ba`Hab", 'סליחות בה"ב');
13111
13114
  addTefillahNote("Avinu Malkeinu", "אבינו מלכנו");
@@ -13117,7 +13120,7 @@ function getAroundTheYearNotifications() {
13117
13120
  addTefillahNote("V`sain Tal U`matar", "ותן טל ומטר");
13118
13121
  }
13119
13122
  break;
13120
- case 9:
13123
+ case JewishMonthsNames.KISLEV:
13121
13124
  if (day <= 7 && dow !== DaysOfWeek.SHABBOS) {
13122
13125
  addTefillahNote("V`sain Tal U`matar", "ותן טל ומטר");
13123
13126
  } else if (day === 24 && dow !== DaysOfWeek.SHABBOS && isAfternoon) {
@@ -13135,7 +13138,7 @@ function getAroundTheYearNotifications() {
13135
13138
  }
13136
13139
  }
13137
13140
  break;
13138
- case 10:
13141
+ case JewishMonthsNames.TEVES:
13139
13142
  if (day <= (jDate.isShortKislev(jdate.Year) ? 3 : 2)) {
13140
13143
  dayInfo.noTachnun = true;
13141
13144
  addDayNote("Chanukah", "חנוכה");
@@ -13158,24 +13161,27 @@ function getAroundTheYearNotifications() {
13158
13161
  addTefillahNote("Aneinu", "עננו");
13159
13162
  }
13160
13163
  break;
13161
- case 11:
13164
+ case JewishMonthsNames.SHVAT:
13162
13165
  if (day === 14 && isAfternoon) dayInfo.noTachnun = true;
13163
13166
  if (day === 15) {
13164
13167
  dayInfo.noTachnun = true;
13165
13168
  addDayNote("Tu B`Shvat", 'ט"ו בשבט');
13166
13169
  }
13167
13170
  break;
13168
- case 12:
13169
- case 13:
13171
+ case JewishMonthsNames.ADAR:
13172
+ case JewishMonthsNames.ADAR_SHEINI:
13170
13173
  if (month === JewishMonthsNames.ADAR && isLeapYear) {
13171
- if ((day === 13 && isAfternoon || [
13174
+ if (day === 13 && isAfternoon) dayInfo.noTachnun = true;
13175
+ if ([
13172
13176
  14,
13173
13177
  15
13174
- ].includes(day)) && isDaytime) {
13178
+ ].includes(day)) {
13175
13179
  addDayNote(day === 14 ? showEnglish ? "Purim Katan" : "פורים קטן" : showEnglish ? "Shushan Purim Katan" : "שושן פורים קטן");
13176
- dayInfo.noTachnun = true;
13177
- if (isMorning && dow !== DaysOfWeek.SHABBOS) {
13178
- noLaminatzeach();
13180
+ if (isDaytime) {
13181
+ dayInfo.noTachnun = true;
13182
+ if (isMorning && dow !== DaysOfWeek.SHABBOS) {
13183
+ noLaminatzeach();
13184
+ }
13179
13185
  }
13180
13186
  }
13181
13187
  } else {
@@ -13187,7 +13193,7 @@ function getAroundTheYearNotifications() {
13187
13193
  addTefillahNote("Avinu Malkeinu", "אבינו מלכנו");
13188
13194
  addTefillahNote("Aneinu", "עננו");
13189
13195
  } else {
13190
- var isYerushalayim = location.Name === "ירושלים";
13196
+ var isYerushalayim = location.Name === "Jerusalem" || location.NameHebrew === "ירושלים";
13191
13197
  if (day === 14) {
13192
13198
  dayInfo.noTachnun = true;
13193
13199
  if (isMorning && dow !== DaysOfWeek.SHABBOS) {