jcal-zmanim 1.5.11 → 1.5.13
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 +51 -23
- package/dist/README.md +59 -25
- package/dist/index.cjs +58 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +58 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -91,7 +91,7 @@ declare class Location {
|
|
|
91
91
|
* @param {Number} elevation Elevation in meters
|
|
92
92
|
* @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
|
|
93
93
|
*/
|
|
94
|
-
constructor(name: string, nameHeb: string | undefined, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
94
|
+
constructor(name: string, nameHeb: string | undefined, israel: boolean | undefined, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
95
95
|
static clone(location: Location): Location;
|
|
96
96
|
static getCandles(location: Location): number;
|
|
97
97
|
/**Gets the Location for Jerusalem.*/
|
|
@@ -200,8 +200,10 @@ declare class jDate {
|
|
|
200
200
|
* Returns the current Jewish date in the format: Thursday, the 3rd of Kislev 5776.
|
|
201
201
|
* @param {boolean} hideDayOfWeek
|
|
202
202
|
* @param {boolean} dontCapitalize
|
|
203
|
+
* @param {boolean} showParsha Show the parsha name?
|
|
204
|
+
* @param {boolean} israel Use the Israeli calendar for determining the parsha?
|
|
203
205
|
*/
|
|
204
|
-
toString(hideDayOfWeek?: boolean, dontCapitalize?: boolean): string;
|
|
206
|
+
toString(hideDayOfWeek?: boolean, dontCapitalize?: boolean, showParsha?: boolean, israel?: boolean): string;
|
|
205
207
|
/**
|
|
206
208
|
* Returns the current Jewish date in the format "[Tuesday] Nissan 3, 5778"
|
|
207
209
|
* @param {boolean} showDow - show day of week?
|
|
@@ -213,10 +215,12 @@ declare class jDate {
|
|
|
213
215
|
*/
|
|
214
216
|
monthName(showYear?: boolean): string;
|
|
215
217
|
/**
|
|
216
|
-
* Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו
|
|
218
|
+
* Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו or יום חמישי לפרשת וישב, כ"א כסלו תשע"ו
|
|
217
219
|
* @param hideDayOfWeek When set to truthy, hides the day of the week
|
|
220
|
+
* @param showParsha When set to truthy, shows the parsha
|
|
221
|
+
* @param israel When set to truthy, uses the Israeli Calendar for ascertaining the parsha
|
|
218
222
|
*/
|
|
219
|
-
toStringHeb(hideDayOfWeek?: boolean): string;
|
|
223
|
+
toStringHeb(hideDayOfWeek?: boolean, showParsha?: boolean, israel?: boolean): string;
|
|
220
224
|
/**Gets the day of the omer for the current Jewish date. If the date is not during sefira, 0 is returned.*/
|
|
221
225
|
getDayOfOmer(): number;
|
|
222
226
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ declare class Location {
|
|
|
91
91
|
* @param {Number} elevation Elevation in meters
|
|
92
92
|
* @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
|
|
93
93
|
*/
|
|
94
|
-
constructor(name: string, nameHeb: string | undefined, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
94
|
+
constructor(name: string, nameHeb: string | undefined, israel: boolean | undefined, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
95
95
|
static clone(location: Location): Location;
|
|
96
96
|
static getCandles(location: Location): number;
|
|
97
97
|
/**Gets the Location for Jerusalem.*/
|
|
@@ -200,8 +200,10 @@ declare class jDate {
|
|
|
200
200
|
* Returns the current Jewish date in the format: Thursday, the 3rd of Kislev 5776.
|
|
201
201
|
* @param {boolean} hideDayOfWeek
|
|
202
202
|
* @param {boolean} dontCapitalize
|
|
203
|
+
* @param {boolean} showParsha Show the parsha name?
|
|
204
|
+
* @param {boolean} israel Use the Israeli calendar for determining the parsha?
|
|
203
205
|
*/
|
|
204
|
-
toString(hideDayOfWeek?: boolean, dontCapitalize?: boolean): string;
|
|
206
|
+
toString(hideDayOfWeek?: boolean, dontCapitalize?: boolean, showParsha?: boolean, israel?: boolean): string;
|
|
205
207
|
/**
|
|
206
208
|
* Returns the current Jewish date in the format "[Tuesday] Nissan 3, 5778"
|
|
207
209
|
* @param {boolean} showDow - show day of week?
|
|
@@ -213,10 +215,12 @@ declare class jDate {
|
|
|
213
215
|
*/
|
|
214
216
|
monthName(showYear?: boolean): string;
|
|
215
217
|
/**
|
|
216
|
-
* Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו
|
|
218
|
+
* Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו or יום חמישי לפרשת וישב, כ"א כסלו תשע"ו
|
|
217
219
|
* @param hideDayOfWeek When set to truthy, hides the day of the week
|
|
220
|
+
* @param showParsha When set to truthy, shows the parsha
|
|
221
|
+
* @param israel When set to truthy, uses the Israeli Calendar for ascertaining the parsha
|
|
218
222
|
*/
|
|
219
|
-
toStringHeb(hideDayOfWeek?: boolean): string;
|
|
223
|
+
toStringHeb(hideDayOfWeek?: boolean, showParsha?: boolean, israel?: boolean): string;
|
|
220
224
|
/**Gets the day of the omer for the current Jewish date. If the date is not during sefira, 0 is returned.*/
|
|
221
225
|
getDayOfOmer(): number;
|
|
222
226
|
/**
|
package/dist/index.js
CHANGED
|
@@ -178,22 +178,13 @@ var DateUtils = /*#__PURE__*/ function() {
|
|
|
178
178
|
value: /**
|
|
179
179
|
* Add two character suffix to number. e.g. 21st, 102nd, 93rd, 500th
|
|
180
180
|
*/ function toSuffixed(num) {
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
case "2":
|
|
189
|
-
suffix = "nd";
|
|
190
|
-
break;
|
|
191
|
-
case "3":
|
|
192
|
-
suffix = "rd";
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return t + suffix;
|
|
181
|
+
var suffixes = [
|
|
182
|
+
"th",
|
|
183
|
+
"st",
|
|
184
|
+
"nd",
|
|
185
|
+
"rd"
|
|
186
|
+
];
|
|
187
|
+
return num.toString() + (suffixes[(num % 100 - 20) % 10] || suffixes[num % 10] || suffixes[0]);
|
|
197
188
|
}
|
|
198
189
|
},
|
|
199
190
|
{
|
|
@@ -3770,9 +3761,15 @@ var _jDate = /*#__PURE__*/ function() {
|
|
|
3770
3761
|
* Returns the current Jewish date in the format: Thursday, the 3rd of Kislev 5776.
|
|
3771
3762
|
* @param {boolean} hideDayOfWeek
|
|
3772
3763
|
* @param {boolean} dontCapitalize
|
|
3764
|
+
* @param {boolean} showParsha Show the parsha name?
|
|
3765
|
+
* @param {boolean} israel Use the Israeli calendar for determining the parsha?
|
|
3773
3766
|
*/ key: "toString",
|
|
3774
|
-
value: function toString(hideDayOfWeek, dontCapitalize) {
|
|
3775
|
-
|
|
3767
|
+
value: function toString(hideDayOfWeek, dontCapitalize, showParsha, israel2) {
|
|
3768
|
+
var sedra = this.getSedra(!!israel2);
|
|
3769
|
+
var parshas = showParsha && (sedra === null || sedra === void 0 ? void 0 : sedra.sedras.length) > 0 ? " of Parshas ".concat(sedra.toString()) : "";
|
|
3770
|
+
var dayOfWeek = !hideDayOfWeek ? "".concat(DaysOfWeekEng[this.getDayOfWeek()]).concat(parshas, ", ") : "";
|
|
3771
|
+
var prefix = dontCapitalize || !hideDayOfWeek ? "the " : "The ";
|
|
3772
|
+
return "".concat(dayOfWeek).concat(prefix).concat(Utils.toSuffixed(this.Day), " of ").concat(this.monthName());
|
|
3776
3773
|
}
|
|
3777
3774
|
},
|
|
3778
3775
|
{
|
|
@@ -3796,11 +3793,17 @@ var _jDate = /*#__PURE__*/ function() {
|
|
|
3796
3793
|
},
|
|
3797
3794
|
{
|
|
3798
3795
|
/**
|
|
3799
|
-
* Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו
|
|
3796
|
+
* Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו or יום חמישי לפרשת וישב, כ"א כסלו תשע"ו
|
|
3800
3797
|
* @param hideDayOfWeek When set to truthy, hides the day of the week
|
|
3798
|
+
* @param showParsha When set to truthy, shows the parsha
|
|
3799
|
+
* @param israel When set to truthy, uses the Israeli Calendar for ascertaining the parsha
|
|
3801
3800
|
*/ key: "toStringHeb",
|
|
3802
|
-
value: function toStringHeb(hideDayOfWeek) {
|
|
3803
|
-
|
|
3801
|
+
value: function toStringHeb(hideDayOfWeek, showParsha, israel2) {
|
|
3802
|
+
var dayOfWeek = !hideDayOfWeek ? "".concat(DaysOfWeekHeb[this.getDayOfWeek()], " ") : "";
|
|
3803
|
+
var sedra = this.getSedra(!!israel2);
|
|
3804
|
+
var parsha = showParsha && (sedra === null || sedra === void 0 ? void 0 : sedra.sedras.length) > 0 ? "לפרשת ".concat(sedra.toStringHeb(), ", ") : "";
|
|
3805
|
+
var monthAdar = "".concat(JewishMonthsHeb[this.Month]).concat(this.Month === 12 && _jDate.isJdLeapY(this.Year) ? " \u05E8\u05D0\u05E9\u05D5\u05DF " : " ");
|
|
3806
|
+
return "".concat(dayOfWeek).concat(parsha).concat(Utils.toJewishNumber(this.Day), " ").concat(monthAdar).concat(Utils.toJewishNumber(this.Year % 1e3));
|
|
3804
3807
|
}
|
|
3805
3808
|
},
|
|
3806
3809
|
{
|
|
@@ -13423,7 +13426,7 @@ var _ZmanimUtils = /*#__PURE__*/ function() {
|
|
|
13423
13426
|
}
|
|
13424
13427
|
break;
|
|
13425
13428
|
case ZmanTypeIds.SofZmanEatingChometz:
|
|
13426
|
-
if (shaaZmanisMga && jdate.Month === 1 && jdate.Day === 14
|
|
13429
|
+
if (shaaZmanisMga && jdate.Month === 1 && jdate.Day === 14) {
|
|
13427
13430
|
zmanTimes.push({
|
|
13428
13431
|
zmanType: zmanType,
|
|
13429
13432
|
time: Utils.addMinutes(sunrise, -90 + offset + shaaZmanisMga * 4)
|
|
@@ -13431,7 +13434,7 @@ var _ZmanimUtils = /*#__PURE__*/ function() {
|
|
|
13431
13434
|
}
|
|
13432
13435
|
break;
|
|
13433
13436
|
case ZmanTypeIds.SofZmanBurnChometz:
|
|
13434
|
-
if (shaaZmanisMga && jdate.Month === 1 && (jdate.Day === 14 || jdate.DayOfWeek === DaysOfWeek.FRIDAY && jdate.Day === 13)
|
|
13437
|
+
if (shaaZmanisMga && jdate.Month === 1 && (jdate.Day === 14 && jdate.DayOfWeek !== DaysOfWeek.SHABBOS || jdate.DayOfWeek === DaysOfWeek.FRIDAY && jdate.Day === 13)) {
|
|
13435
13438
|
zmanTimes.push({
|
|
13436
13439
|
zmanType: zmanType,
|
|
13437
13440
|
time: Utils.addMinutes(sunrise, -90 + offset + shaaZmanisMga * 5)
|
|
@@ -13720,9 +13723,28 @@ function getAroundTheYearNotifications() {
|
|
|
13720
13723
|
if (dow !== DaysOfWeek.SHABBOS && day > 15 && day !== 21) {
|
|
13721
13724
|
addTefillahNote("Vesain Bracha", "\u05D5\u05EA\u05DF \u05D1\u05E8\u05DB\u05D4");
|
|
13722
13725
|
}
|
|
13726
|
+
if (!isNightTime && (dow !== DaysOfWeek.THURSDAY && day === 13 || dow === DaysOfWeek.WEDNESDAY && day === 12)) {
|
|
13727
|
+
addDayNote("Bedikas Chometz Tonight", "\u05D1\u05D3\u05D9\u05E7\u05EA \u05D7\u05DE\u05E5 \u05D1\u05E2\u05E8\u05D1");
|
|
13728
|
+
}
|
|
13723
13729
|
if (isNightTime && (dow !== DaysOfWeek.FRIDAY && day === 14 || dow === DaysOfWeek.THURSDAY && day === 13)) {
|
|
13724
13730
|
addDayNote("Bedikas Chometz", "\u05D1\u05D3\u05D9\u05E7\u05EA \u05D7\u05DE\u05E5");
|
|
13725
13731
|
}
|
|
13732
|
+
if (day === 14) {
|
|
13733
|
+
var eatingZman = ZmanimUtils.getZmanTimes([
|
|
13734
|
+
getZmanType(ZmanTypeIds.SofZmanEatingChometz)
|
|
13735
|
+
], sdate, jdate, location)[0];
|
|
13736
|
+
if (eatingZman && eatingZman.time) {
|
|
13737
|
+
addDayNote("Sof Zman Eating Chometz: ".concat(Utils.getTimeString(eatingZman.time)), "סוף זמן אכילת חמץ: ".concat(Utils.getTimeString(eatingZman.time)));
|
|
13738
|
+
}
|
|
13739
|
+
}
|
|
13740
|
+
if (day === 14 && dow !== DaysOfWeek.SHABBOS || day === 13 && dow === DaysOfWeek.FRIDAY) {
|
|
13741
|
+
var burnZman = ZmanimUtils.getZmanTimes([
|
|
13742
|
+
getZmanType(ZmanTypeIds.SofZmanBurnChometz)
|
|
13743
|
+
], sdate, jdate, location)[0];
|
|
13744
|
+
if (burnZman && burnZman.time) {
|
|
13745
|
+
addDayNote("Sof Zman Burn Chometz: ".concat(Utils.getTimeString(burnZman.time)), "סוף זמן ביעור חמץ: ".concat(Utils.getTimeString(burnZman.time)));
|
|
13746
|
+
}
|
|
13747
|
+
}
|
|
13726
13748
|
if (isMorning && dow !== DaysOfWeek.SHABBOS && [
|
|
13727
13749
|
14,
|
|
13728
13750
|
16,
|
|
@@ -13898,8 +13920,8 @@ function getAroundTheYearNotifications() {
|
|
|
13898
13920
|
break;
|
|
13899
13921
|
case JewishMonthsNames.TAMUZ:
|
|
13900
13922
|
if (isDaytime && (day === 17 && DaysOfWeek.SHABBOS !== 6 || day === 18 && dow === DaysOfWeek.SUNDAY)) {
|
|
13923
|
+
addDayNote("Shiva Asar B`Tamuz", '\u05D9"\u05D6 \u05D1\u05EA\u05DE\u05D5\u05D6');
|
|
13901
13924
|
if (isDaytime) {
|
|
13902
|
-
addDayNote("Shiva Asar B`Tamuz", '\u05D9"\u05D6 \u05D1\u05EA\u05DE\u05D5\u05D6');
|
|
13903
13925
|
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
13904
13926
|
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
13905
13927
|
}
|
|
@@ -14005,8 +14027,8 @@ function getAroundTheYearNotifications() {
|
|
|
14005
14027
|
break;
|
|
14006
14028
|
case 3:
|
|
14007
14029
|
if (dow !== DaysOfWeek.SHABBOS) {
|
|
14030
|
+
addDayNote("Fast of Tzom Gedalya", "\u05E6\u05D5\u05DD \u05D2\u05D3\u05DC\u05D9\u05D4");
|
|
14008
14031
|
if (isDaytime) {
|
|
14009
|
-
addDayNote("Fast of Tzom Gedalya", "\u05E6\u05D5\u05DD \u05D2\u05D3\u05DC\u05D9\u05D4");
|
|
14010
14032
|
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
14011
14033
|
}
|
|
14012
14034
|
if (isAfterChatzosHalayla || isMorning) {
|
|
@@ -14017,8 +14039,8 @@ function getAroundTheYearNotifications() {
|
|
|
14017
14039
|
break;
|
|
14018
14040
|
case 4:
|
|
14019
14041
|
if (dow === DaysOfWeek.SUNDAY) {
|
|
14042
|
+
addDayNote("Fast of Tzom Gedalya", "\u05E6\u05D5\u05DD \u05D2\u05D3\u05DC\u05D9\u05D4");
|
|
14020
14043
|
if (isDaytime) {
|
|
14021
|
-
addDayNote("Fast of Tzom Gedalya", "\u05E6\u05D5\u05DD \u05D2\u05D3\u05DC\u05D9\u05D4");
|
|
14022
14044
|
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
14023
14045
|
}
|
|
14024
14046
|
if (isAfterChatzosHalayla || isMorning) {
|
|
@@ -14264,13 +14286,15 @@ function getAroundTheYearNotifications() {
|
|
|
14264
14286
|
}
|
|
14265
14287
|
}
|
|
14266
14288
|
}
|
|
14267
|
-
} else if (day === 10
|
|
14289
|
+
} else if (day === 10) {
|
|
14268
14290
|
addDayNote("Fast of Asara B`Teves", "\u05E2\u05E9\u05E8\u05D4 \u05D1\u05D8\u05D1\u05EA");
|
|
14269
14291
|
if (isMorning) {
|
|
14270
14292
|
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
14271
14293
|
}
|
|
14272
|
-
|
|
14273
|
-
|
|
14294
|
+
if (isDaytime) {
|
|
14295
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
14296
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
14297
|
+
}
|
|
14274
14298
|
}
|
|
14275
14299
|
break;
|
|
14276
14300
|
case JewishMonthsNames.SHVAT:
|
|
@@ -14298,12 +14322,14 @@ function getAroundTheYearNotifications() {
|
|
|
14298
14322
|
}
|
|
14299
14323
|
} else {
|
|
14300
14324
|
if (isDaytime && (day === 11 && dow === DaysOfWeek.THURSDAY || day === 13 && dow !== DaysOfWeek.SHABBOS)) {
|
|
14325
|
+
addDayNote("Fast of Ta`anis Esther", "\u05EA\u05E2\u05E0\u05D9\u05EA \u05D0\u05E1\u05EA\u05E8");
|
|
14301
14326
|
if (isMorning) {
|
|
14302
|
-
addDayNote("Fast of Ta`anis Esther", "\u05EA\u05E2\u05E0\u05D9\u05EA \u05D0\u05E1\u05EA\u05E8");
|
|
14303
14327
|
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
14304
14328
|
}
|
|
14305
|
-
|
|
14306
|
-
|
|
14329
|
+
if (isDaytime) {
|
|
14330
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
14331
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
14332
|
+
}
|
|
14307
14333
|
} else {
|
|
14308
14334
|
var isYerushalayim = location.Name === "Jerusalem" || location.NameHebrew === "\u05D9\u05E8\u05D5\u05E9\u05DC\u05D9\u05DD";
|
|
14309
14335
|
if (day === 14) {
|