jcal-zmanim 1.2.9 → 1.3.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/README.md CHANGED
@@ -178,7 +178,7 @@ const currentJDate = jDate.now();
178
178
  | **getDate()** | `Date` | Returns the javascript Date of this jDate.<br />This represents the Gregorian date that starts at midnight of the current Jewish Date. |
179
179
  | **toString(hideDayOfWeek?, dontCapitalize?)** | `string` | Returns the current Jewish date in the format: "*Thursday, the 3rd of Kislev 5776*".<br />If *hideDayOfWeek* is truthy, the day of the week is left out.<br />If *dontCapitalize* is truthy and *hideDayOfWeek* is truthy, the 't' of "The 3rd etc." will be a regular 't', otherwise it will be a 'T'. This parameter has no effect when *hideDayOfWeek* is falsey. |
180
180
  | **toShortstring(showDayOfWeek?)**| `string` | Returns the current Jewish date in the format "*Nissan 3, 5778*".<br />If showDayOfWeek is truthy, "*Tuesday Nissan 3, 5778*" is returned. |
181
- |**toStringHeb()**|`string`|Returns the current Jewish date in the format:<br />*"יום חמישי כ"א כסלו תשע"ו"*|
181
+ |**toStringHeb(hideDayOfWeek?)**|`string`|Returns the current Jewish date in the format:<br />*"יום חמישי כ"א כסלו תשע"ו"*<br />If *hideDayOfWeek* is truthy, the day of the week is left out.|
182
182
  | **addDays(numberOfDays)** | `jDate` | Returns a new Jewish Date by adding the given number of days to the current Jewish date.<br><br>Here is a nice trick that can be used to get the upcoming Shabbos:<br>-------------<br>`import {jDate, DaysOfWeek} from "jcal-zmanim";`<br>`const now = jDate.now();`<br>`const shabbos = now.addDays(DaysOfWeek.SHABBOS - (now.DayOfWeek % DaysOfWeek.SHABBOS));`<br>-------------<br>This can be used for any upcoming day - just substitute the DaysOfWeek you need.|
183
183
  | **addMonths(numberOfMonths)** | `jDate` | Returns a new Jewish date by adding the given number of Jewish Months to the current Jewish date.<br />If the current Day is 30 and the new month only has 29 days, the 29th day of the month is returned. |
184
184
  | **addYears(numberOfYears)** | `jDate` | Returns a new Jewish date represented by adding the given number of Jewish Years to the current Jewish date.<br />If the current Day is 30 and the new dates month only has 29 days, the 29th day of the month is returned. |
@@ -285,7 +285,7 @@ const myLocation = new Location(
285
285
  -155.23, // The longitude. East is negative.
286
286
  11, // The Time Zone: The number of hours offset from UTC.
287
287
  1106, // The elevation in Meters. (Feet x 3.2808)
288
- 18) // The number of minutes before sunset candles are lit on Erev Shabbos.
288
+ 18 // The number of minutes before sunset candles are lit on Erev Shabbos.
289
289
  );
290
290
  ```
291
291
 
package/dist/README.md CHANGED
@@ -178,7 +178,7 @@ const currentJDate = jDate.now();
178
178
  | **getDate()** | `Date` | Returns the javascript Date of this jDate.<br />This represents the Gregorian date that starts at midnight of the current Jewish Date. |
179
179
  | **toString(hideDayOfWeek?, dontCapitalize?)** | `string` | Returns the current Jewish date in the format: "*Thursday, the 3rd of Kislev 5776*".<br />If *hideDayOfWeek* is truthy, the day of the week is left out.<br />If *dontCapitalize* is truthy and *hideDayOfWeek* is truthy, the 't' of "The 3rd etc." will be a regular 't', otherwise it will be a 'T'. This parameter has no effect when *hideDayOfWeek* is falsey. |
180
180
  | **toShortstring(showDayOfWeek?)**| `string` | Returns the current Jewish date in the format "*Nissan 3, 5778*".<br />If showDayOfWeek is truthy, "*Tuesday Nissan 3, 5778*" is returned. |
181
- |**toStringHeb()**|`string`|Returns the current Jewish date in the format:<br />*"יום חמישי כ"א כסלו תשע"ו"*|
181
+ |**toStringHeb(hideDayOfWeek?)**|`string`|Returns the current Jewish date in the format:<br />*"יום חמישי כ"א כסלו תשע"ו"*<br />If *hideDayOfWeek* is truthy, the day of the week is left out.|
182
182
  | **addDays(numberOfDays)** | `jDate` | Returns a new Jewish Date by adding the given number of days to the current Jewish date.<br><br>Here is a nice trick that can be used to get the upcoming Shabbos:<br>-------------<br>`import {jDate, DaysOfWeek} from "jcal-zmanim";`<br>`const now = jDate.now();`<br>`const shabbos = now.addDays(DaysOfWeek.SHABBOS - (now.DayOfWeek % DaysOfWeek.SHABBOS));`<br>-------------<br>This can be used for any upcoming day - just substitute the DaysOfWeek you need.|
183
183
  | **addMonths(numberOfMonths)** | `jDate` | Returns a new Jewish date by adding the given number of Jewish Months to the current Jewish date.<br />If the current Day is 30 and the new month only has 29 days, the 29th day of the month is returned. |
184
184
  | **addYears(numberOfYears)** | `jDate` | Returns a new Jewish date represented by adding the given number of Jewish Years to the current Jewish date.<br />If the current Day is 30 and the new dates month only has 29 days, the 29th day of the month is returned. |
@@ -285,7 +285,7 @@ const myLocation = new Location(
285
285
  -155.23, // The longitude. East is negative.
286
286
  11, // The Time Zone: The number of hours offset from UTC.
287
287
  1106, // The elevation in Meters. (Feet x 3.2808)
288
- 18) // The number of minutes before sunset candles are lit on Erev Shabbos.
288
+ 18 // The number of minutes before sunset candles are lit on Erev Shabbos.
289
289
  );
290
290
  ```
291
291
 
package/dist/index.cjs CHANGED
@@ -12571,7 +12571,7 @@ function getWeekDayNotifications() {
12571
12571
  var isNightTime = dayInfo.isNightTime, dow = dayInfo.dow, isYomTov = dayInfo.isYomTov, month = dayInfo.month, day = dayInfo.day, isMorning = dayInfo.isMorning, jdate = dayInfo.jdate, location = dayInfo.location, isDaytime = dayInfo.isDaytime, isAfternoon = dayInfo.isAfternoon;
12572
12572
  if (isNightTime && dow === DaysOfWeek.SUNDAY) {
12573
12573
  addTefillahNote(month === JewishMonthsNames.NISSAN && day === 15 || month === JewishMonthsNames.SIVAN && day === 6 ? "ותודיעינו" : "אתה חוננתנו");
12574
- if (month === JewishMonthsNames.ELLUL && day > 22 || month === JewishMonthsNames.TISHREI && day < 22 && day !== 3 || month === JewishMonthsNames.NISSAN && day > 8 && day < 15 || month === JewishMonthsNames.SIVAN && day < 6) {
12574
+ if (month === JewishMonthsNames.ELLUL && day > 22 || month === JewishMonthsNames.TISHREI && day > 4 && day < 22 || month === JewishMonthsNames.NISSAN && day > 8 && day < 15 || month === JewishMonthsNames.SIVAN && day < 6) {
12575
12575
  addTefillahNote("No Vihi Noam", 'א"א ויהי נועם');
12576
12576
  }
12577
12577
  } else if (isNightTime && (month === JewishMonthsNames.NISSAN && (day === 16 || day === 22) || month === JewishMonthsNames.SIVAN && day === 7 || month === JewishMonthsNames.TISHREI && [
@@ -12609,7 +12609,12 @@ function getWeekDayNotifications() {
12609
12609
  }
12610
12610
  }
12611
12611
  function getAroundTheYearNotifications() {
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;
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, sdate = dayInfo.sdate, isLeapYear = dayInfo.isLeapYear, location = dayInfo.location;
12613
+ var showVsainTalUmatarInChul = false;
12614
+ if (!location.Israel && sdate.getMonth() === 11 && sdate.getDate() > 4) {
12615
+ var startVsainTalUmatar = jdate.Year % 4 === 0 ? 6 : 5;
12616
+ showVsainTalUmatarInChul = sdate.getDate() >= startVsainTalUmatar && sdate.getDate() <= startVsainTalUmatar + 14;
12617
+ }
12613
12618
  switch(month){
12614
12619
  case JewishMonthsNames.NISSAN:
12615
12620
  dayInfo.noTachnun = true;
@@ -12959,6 +12964,10 @@ function getAroundTheYearNotifications() {
12959
12964
  addTefillahNote('קה"ת במנחה סוף פרשת אח"מ');
12960
12965
  }
12961
12966
  break;
12967
+ case 11:
12968
+ if (isNightTime) {
12969
+ addDayNote("לך אכל בשמחה לחמך כי כבר רצה האלקים את מעשיך");
12970
+ }
12962
12971
  case 15:
12963
12972
  addDayNote("First day of Sukkos", 'יו"ט ראשון של סוכות');
12964
12973
  addTefillahNote("Ya`aleh V`yavo", "יעלה ויבא");
@@ -13116,12 +13125,12 @@ function getAroundTheYearNotifications() {
13116
13125
  if (day <= 22) {
13117
13126
  addTefillahNote("Mashiv Haruach U`Morid Hageshem", "משיב הרוח ומוריד הגשם");
13118
13127
  }
13119
- if (day >= 7 && dow !== DaysOfWeek.SHABBOS) {
13128
+ if ((location.Israel && day >= 7 || !location.Israel && showVsainTalUmatarInChul) && dow !== DaysOfWeek.SHABBOS) {
13120
13129
  addTefillahNote("V`sain Tal U`matar", "ותן טל ומטר");
13121
13130
  }
13122
13131
  break;
13123
13132
  case JewishMonthsNames.KISLEV:
13124
- if (day <= 7 && dow !== DaysOfWeek.SHABBOS) {
13133
+ if ((location.Israel && day <= 7 || !location.Israel && showVsainTalUmatarInChul) && dow !== DaysOfWeek.SHABBOS) {
13125
13134
  addTefillahNote("V`sain Tal U`matar", "ותן טל ומטר");
13126
13135
  } else if (day === 24 && dow !== DaysOfWeek.SHABBOS && isAfternoon) {
13127
13136
  dayInfo.noTachnun = true;
@@ -13139,6 +13148,9 @@ function getAroundTheYearNotifications() {
13139
13148
  }
13140
13149
  break;
13141
13150
  case JewishMonthsNames.TEVES:
13151
+ if (!location.Israel && showVsainTalUmatarInChul && dow !== DaysOfWeek.SHABBOS) {
13152
+ addTefillahNote("V`sain Tal U`matar", "ותן טל ומטר");
13153
+ }
13142
13154
  if (day <= (jDate.isShortKislev(jdate.Year) ? 3 : 2)) {
13143
13155
  dayInfo.noTachnun = true;
13144
13156
  addDayNote("Chanukah", "חנוכה");