jcal-zmanim 1.2.6 → 1.2.8

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