jcal-zmanim 1.3.0 → 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/LICENSE +674 -674
- package/README.md +597 -597
- package/dist/README.md +597 -0
- package/dist/index.cjs +13343 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +927 -0
- package/dist/index.d.ts +927 -0
- package/dist/index.js +3491 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -50
package/dist/index.js
ADDED
|
@@ -0,0 +1,3491 @@
|
|
|
1
|
+
// src/JCal/Sedra.ts
|
|
2
|
+
var _Sedra = class _Sedra {
|
|
3
|
+
/**
|
|
4
|
+
* @param {jDate} jd
|
|
5
|
+
* @param {boolean} israel
|
|
6
|
+
*/
|
|
7
|
+
constructor(jd, israel2) {
|
|
8
|
+
if (jd.Month === 7 && jd.Day >= 15 && jd.Day < (israel2 ? 23 : 24)) {
|
|
9
|
+
this.sedras = [_Sedra.sedraList[53]];
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
let sedraArray = [], sedraOrder = _Sedra.getSedraOrder(jd.Year, israel2), absDate = jd.Abs, index, weekNum;
|
|
13
|
+
absDate = _Sedra.getDayOnOrBefore(6, absDate + 6);
|
|
14
|
+
weekNum = (absDate - sedraOrder.firstSatInYear) / 7;
|
|
15
|
+
if (sedraOrder.sedraArray && weekNum >= sedraOrder.sedraArray.length) {
|
|
16
|
+
const indexLast = sedraOrder.sedraArray[sedraOrder.sedraArray.length - 1];
|
|
17
|
+
if (indexLast < 0) {
|
|
18
|
+
index = -indexLast + 2;
|
|
19
|
+
} else {
|
|
20
|
+
index = indexLast + 1;
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
index = sedraOrder.sedraArray ? sedraOrder.sedraArray[weekNum] : -1;
|
|
24
|
+
}
|
|
25
|
+
if (index >= 0) {
|
|
26
|
+
sedraArray = [_Sedra.sedraList[index]];
|
|
27
|
+
} else {
|
|
28
|
+
const i = -index;
|
|
29
|
+
sedraArray = [_Sedra.sedraList[i], _Sedra.sedraList[i + 1]];
|
|
30
|
+
}
|
|
31
|
+
this.sedras = sedraArray;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Gets the sedra/s as a string. If there are two, they are seperated by a " - "
|
|
35
|
+
*/
|
|
36
|
+
toString() {
|
|
37
|
+
return this.sedras.map((s) => s.eng).join(" - ");
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets the sedra/s as a string. If there are two, they are seperated by a " - "
|
|
41
|
+
*/
|
|
42
|
+
toStringHeb() {
|
|
43
|
+
return this.sedras.map((s) => s.heb).join(" - ");
|
|
44
|
+
}
|
|
45
|
+
static getDayOnOrBefore(day_of_week, date) {
|
|
46
|
+
return date - (date - day_of_week) % 7;
|
|
47
|
+
}
|
|
48
|
+
static getSedraOrder(year, israel2) {
|
|
49
|
+
if (_Sedra.lastCalculatedYear != null && _Sedra.lastCalculatedYear.year === year && _Sedra.lastCalculatedYear.israel === israel2) {
|
|
50
|
+
return _Sedra.lastCalculatedYear;
|
|
51
|
+
}
|
|
52
|
+
const longCheshvon = jDate.isLongCheshvan(year), shortKislev = jDate.isShortKislev(year), roshHashana = jDate.absJd(year, 7, 1), roshHashanaDOW = Math.abs(roshHashana % 7), firstSatInYear = _Sedra.getDayOnOrBefore(6, roshHashana + 6);
|
|
53
|
+
let yearType, sArray;
|
|
54
|
+
if (longCheshvon && !shortKislev)
|
|
55
|
+
yearType = "complete";
|
|
56
|
+
else if (!longCheshvon && shortKislev)
|
|
57
|
+
yearType = "incomplete";
|
|
58
|
+
else
|
|
59
|
+
yearType = "regular";
|
|
60
|
+
if (!jDate.isJdLeapY(year)) {
|
|
61
|
+
switch (roshHashanaDOW) {
|
|
62
|
+
case 6:
|
|
63
|
+
if (yearType === "incomplete") {
|
|
64
|
+
sArray = _Sedra.shabbos_short;
|
|
65
|
+
} else if (yearType === "complete") {
|
|
66
|
+
sArray = _Sedra.shabbos_long;
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case 1:
|
|
70
|
+
if (yearType === "incomplete") {
|
|
71
|
+
sArray = _Sedra.mon_short;
|
|
72
|
+
} else if (yearType === "complete") {
|
|
73
|
+
sArray = israel2 ? _Sedra.mon_short : _Sedra.mon_long;
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
case 2:
|
|
77
|
+
if (yearType === "regular") {
|
|
78
|
+
sArray = israel2 ? _Sedra.mon_short : _Sedra.mon_long;
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case 4:
|
|
82
|
+
if (yearType === "regular") {
|
|
83
|
+
sArray = israel2 ? _Sedra.thu_normal_Israel : _Sedra.thu_normal;
|
|
84
|
+
} else if (yearType === "complete") {
|
|
85
|
+
sArray = _Sedra.thu_long;
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
default:
|
|
89
|
+
throw "improper sedra year type calculated.";
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
switch (roshHashanaDOW) {
|
|
93
|
+
case 6:
|
|
94
|
+
if (yearType === "incomplete") {
|
|
95
|
+
sArray = _Sedra.shabbos_short_leap;
|
|
96
|
+
} else if (yearType === "complete") {
|
|
97
|
+
sArray = israel2 ? _Sedra.shabbos_short_leap : _Sedra.shabbos_long_leap;
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
case 1:
|
|
101
|
+
if (yearType === "incomplete") {
|
|
102
|
+
sArray = israel2 ? _Sedra.mon_short_leap_Israel : _Sedra.mon_short_leap;
|
|
103
|
+
} else if (yearType === "complete") {
|
|
104
|
+
sArray = israel2 ? _Sedra.mon_long_leap_Israel : _Sedra.mon_long_leap;
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
case 2:
|
|
108
|
+
if (yearType === "regular") {
|
|
109
|
+
sArray = israel2 ? _Sedra.mon_long_leap_Israel : _Sedra.mon_long_leap;
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
case 4:
|
|
113
|
+
if (yearType === "incomplete") {
|
|
114
|
+
sArray = _Sedra.thu_short_leap;
|
|
115
|
+
} else if (yearType === "complete") {
|
|
116
|
+
sArray = _Sedra.thu_long_leap;
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
default:
|
|
120
|
+
throw "improper sedra year type calculated.";
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const retobj = {
|
|
124
|
+
firstSatInYear,
|
|
125
|
+
sedraArray: sArray,
|
|
126
|
+
year,
|
|
127
|
+
israel: israel2
|
|
128
|
+
};
|
|
129
|
+
_Sedra.lastCalculatedYear = retobj;
|
|
130
|
+
return retobj;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
_Sedra.lastCalculatedYear = null;
|
|
134
|
+
_Sedra.sedraList = [{ eng: "Bereshis", heb: "\u05D1\u05E8\u05D0\u05E9\u05D9\u05EA" }, { eng: "Noach", heb: "\u05E0\u05D7" }, { eng: "Lech-Lecha", heb: "\u05DC\u05DA \u05DC\u05DA" }, { eng: "Vayera", heb: "\u05D5\u05D9\u05E8\u05D0" }, { eng: "Chayei Sara", heb: "\u05D7\u05D9\u05D9 \u05E9\u05E8\u05D4" }, { eng: "Toldos", heb: "\u05EA\u05D5\u05DC\u05D3\u05D5\u05EA" }, { eng: "Vayetzei", heb: "\u05D5\u05D9\u05E6\u05D0" }, { eng: "Vayishlach", heb: "\u05D5\u05D9\u05E9\u05DC\u05D7" }, { eng: "Vayeishev", heb: "\u05D5\u05D9\u05E9\u05D1" }, { eng: "Mikeitz", heb: "\u05DE\u05E7\u05E5" }, { eng: "Vayigash", heb: "\u05D5\u05D9\u05D2\u05E9" }, { eng: "Vayechi", heb: "\u05D5\u05D9\u05D7\u05D9" }, { eng: "Shemos", heb: "\u05E9\u05DE\u05D5\u05EA" }, { eng: "Va'era", heb: "\u05D5\u05D0\u05E8\u05D0" }, { eng: "Bo", heb: "\u05D1\u05D0" }, { eng: "Beshalach", heb: "\u05D1\u05E9\u05DC\u05D7" }, { eng: "Yisro", heb: "\u05D9\u05EA\u05E8\u05D5" }, { eng: "Mishpatim", heb: "\u05DE\u05E9\u05E4\u05D8\u05D9\u05DD" }, { eng: "Terumah", heb: "\u05EA\u05E8\u05D5\u05DE\u05D4" }, { eng: "Tetzaveh", heb: "\u05EA\u05E6\u05D5\u05D4" }, { eng: "Ki Sisa", heb: "\u05DB\u05D9 \u05EA\u05E9\u05D0" }, { eng: "Vayakhel", heb: "\u05D5\u05D9\u05E7\u05D4\u05DC" }, { eng: "Pekudei", heb: "\u05E4\u05E7\u05D5\u05D3\u05D9" }, { eng: "Vayikra", heb: "\u05D5\u05D9\u05E7\u05E8\u05D0" }, { eng: "Tzav", heb: "\u05E6\u05D5" }, { eng: "Shmini", heb: "\u05E9\u05DE\u05D9\u05E0\u05D9" }, { eng: "Tazria", heb: "\u05EA\u05D6\u05E8\u05D9\u05E2" }, { eng: "Metzora", heb: "\u05DE\u05E6\u05D5\u05E8\u05E2" }, { eng: "Achrei Mos", heb: "\u05D0\u05D7\u05E8\u05D9 \u05DE\u05D5\u05EA" }, { eng: "Kedoshim", heb: "\u05E7\u05D3\u05D5\u05E9\u05D9\u05DD" }, { eng: "Emor", heb: "\u05D0\u05DE\u05D5\u05E8" }, { eng: "Behar", heb: "\u05D1\u05D4\u05E8" }, { eng: "Bechukosai", heb: "\u05D1\u05D7\u05E7\u05D5\u05EA\u05D9" }, { eng: "Bamidbar", heb: "\u05D1\u05DE\u05D3\u05D1\u05E8" }, { eng: "Nasso", heb: "\u05E0\u05E9\u05D0" }, { eng: "Beha'aloscha", heb: "\u05D1\u05D4\u05E2\u05DC\u05EA\u05DA" }, { eng: "Sh'lach", heb: "\u05E9\u05DC\u05D7" }, { eng: "Korach", heb: "\u05E7\u05E8\u05D7" }, { eng: "Chukas", heb: "\u05D7\u05E7\u05EA" }, { eng: "Balak", heb: "\u05D1\u05DC\u05E7" }, { eng: "Pinchas", heb: "\u05E4\u05D9\u05E0\u05D7\u05E1" }, { eng: "Matos", heb: "\u05DE\u05D8\u05D5\u05EA" }, { eng: "Masei", heb: "\u05DE\u05E1\u05E2\u05D9" }, { eng: "Devarim", heb: "\u05D3\u05D1\u05E8\u05D9\u05DD" }, { eng: "Va'eschanan", heb: "\u05D5\u05D0\u05EA\u05D7\u05E0\u05DF" }, { eng: "Eikev", heb: "\u05E2\u05E7\u05D1" }, { eng: "Re'eh", heb: "\u05E8\u05D0\u05D4" }, { eng: "Shoftim", heb: "\u05E9\u05D5\u05E4\u05D8\u05D9\u05DD" }, { eng: "Ki Seitzei", heb: "\u05DB\u05D9 \u05EA\u05E6\u05D0" }, { eng: "Ki Savo", heb: "\u05DB\u05D9 \u05EA\u05D1\u05D0" }, { eng: "Nitzavim", heb: "\u05E0\u05E6\u05D1\u05D9\u05DD" }, { eng: "Vayeilech", heb: "\u05D5\u05D9\u05DC\u05DA" }, { eng: "Ha'Azinu", heb: "\u05D4\u05D0\u05D6\u05D9\u05E0\u05D5" }, { eng: "Vezos Habracha", heb: "\u05D5\u05D6\u05D0\u05EA \u05D4\u05D1\u05E8\u05DB\u05D4" }];
|
|
135
|
+
_Sedra.shabbos_short = [52, 52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -21, 23, 24, 25, 25, -26, -28, 30, -31, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, 50];
|
|
136
|
+
_Sedra.shabbos_long = [52, 52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -21, 23, 24, 25, 25, -26, -28, 30, -31, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
137
|
+
_Sedra.mon_short = [51, 52, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -21, 23, 24, 25, 25, -26, -28, 30, -31, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
138
|
+
_Sedra.mon_long = [51, 52, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -21, 23, 24, 25, 25, -26, -28, 30, -31, 33, 34, 34, 35, 36, 37, -38, 40, -41, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
139
|
+
_Sedra.thu_normal = [52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -21, 23, 24, 25, 25, 25, -26, -28, 30, -31, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, 50];
|
|
140
|
+
_Sedra.thu_normal_Israel = [52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -21, 23, 24, 25, 25, -26, -28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, 50];
|
|
141
|
+
_Sedra.thu_long = [52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, -26, -28, 30, -31, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, 50];
|
|
142
|
+
_Sedra.shabbos_short_leap = [52, 52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
143
|
+
_Sedra.shabbos_long_leap = [52, 52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 28, 29, 30, 31, 32, 33, 34, 34, 35, 36, 37, -38, 40, -41, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
144
|
+
_Sedra.mon_short_leap = [51, 52, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 28, 29, 30, 31, 32, 33, 34, 34, 35, 36, 37, -38, 40, -41, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
145
|
+
_Sedra.mon_short_leap_Israel = [51, 52, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
146
|
+
_Sedra.mon_long_leap = [51, 52, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 28, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -41, 43, 44, 45, 46, 47, 48, 49, 50];
|
|
147
|
+
_Sedra.mon_long_leap_Israel = [51, 52, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50];
|
|
148
|
+
_Sedra.thu_short_leap = [52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50];
|
|
149
|
+
_Sedra.thu_long_leap = [52, 53, 53, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, -50];
|
|
150
|
+
var Sedra = _Sedra;
|
|
151
|
+
|
|
152
|
+
// src/JCal/PirkeiAvos.ts
|
|
153
|
+
var _PirkeiAvos = class _PirkeiAvos {
|
|
154
|
+
static getPrakim(jd, israel2) {
|
|
155
|
+
if (jd.getDayOfWeek() !== 6) {
|
|
156
|
+
return [];
|
|
157
|
+
}
|
|
158
|
+
const jMonth = jd.Month, jDay = jd.Day;
|
|
159
|
+
if (jMonth === 1 && jDay > (israel2 ? 21 : 22) || //All Shabbosim through Iyar, Sivan, Tamuz, Av - besides for the day/s of Shavuos and Tisha B'Av
|
|
160
|
+
jMonth > 1 && jMonth < 6 && !(jMonth === 3 && jDay === 6 || !israel2 && jMonth === 3 && jDay === 7) && !(jMonth === 5 && jDay === 9)) {
|
|
161
|
+
return [_PirkeiAvos._get1stPerek(jd, israel2)];
|
|
162
|
+
} else if (jMonth === 6) {
|
|
163
|
+
return _PirkeiAvos._ellul(jd, israel2);
|
|
164
|
+
} else {
|
|
165
|
+
return [];
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
_PirkeiAvos._get1stPerek = function(jd, israel2) {
|
|
170
|
+
const jYear = jd.Year, jMonth = jd.Month, jDay = jd.Day, pes1 = new jDate(jYear, 1, 15), shb1 = (israel2 ? 7 : 8) + (6 - pes1.getDayOfWeek()), cShb = jMonth === 1 && jDay === shb1 + 15 ? 1 : Utils.toInt((jd.Abs - (pes1.Abs + shb1)) / 7) + 1;
|
|
171
|
+
let prk = cShb % 6;
|
|
172
|
+
if (prk === 0)
|
|
173
|
+
prk = 6;
|
|
174
|
+
if (!israel2 && pes1.getDayOfWeek() === 4 && (jMonth > 3 || jMonth === 3 && jDay > 6)) {
|
|
175
|
+
prk = prk === 1 ? 6 : prk - 1;
|
|
176
|
+
}
|
|
177
|
+
if (pes1.getDayOfWeek() === 6 && (jMonth > 5 || jMonth === 5 && jDay > 9)) {
|
|
178
|
+
prk = prk === 1 ? 6 : prk - 1;
|
|
179
|
+
}
|
|
180
|
+
return prk;
|
|
181
|
+
};
|
|
182
|
+
_PirkeiAvos._ellul = function(jd, israel2) {
|
|
183
|
+
let prakim;
|
|
184
|
+
const jYear = jd.Year, jDay = jd.Day, day1 = new jDate(jYear, 6, 1, jd.Abs - jd.Day + 1), day1DOW = day1.getDayOfWeek(), shabbos1Day = day1DOW === 6 ? 1 : 6 - (day1DOW + 6) % 6 + 1, shabbos1Date = new jDate(jYear, 6, shabbos1Day, day1.Abs + shabbos1Day - 1), cShb = jDay === shabbos1Day ? 1 : Utils.toInt((jDay - shabbos1Day) / 7) + 1;
|
|
185
|
+
switch (_PirkeiAvos._get1stPerek(shabbos1Date, israel2)) {
|
|
186
|
+
case 1:
|
|
187
|
+
switch (cShb) {
|
|
188
|
+
case 1:
|
|
189
|
+
prakim = [1];
|
|
190
|
+
break;
|
|
191
|
+
case 2:
|
|
192
|
+
prakim = [2];
|
|
193
|
+
break;
|
|
194
|
+
case 3:
|
|
195
|
+
prakim = [3, 4];
|
|
196
|
+
break;
|
|
197
|
+
case 4:
|
|
198
|
+
prakim = [5, 6];
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case 2:
|
|
203
|
+
switch (cShb) {
|
|
204
|
+
case 1:
|
|
205
|
+
prakim = [2];
|
|
206
|
+
break;
|
|
207
|
+
case 2:
|
|
208
|
+
prakim = [3];
|
|
209
|
+
break;
|
|
210
|
+
case 3:
|
|
211
|
+
prakim = [4];
|
|
212
|
+
break;
|
|
213
|
+
case 4:
|
|
214
|
+
prakim = [5, 6];
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
break;
|
|
218
|
+
case 3:
|
|
219
|
+
switch (cShb) {
|
|
220
|
+
case 1:
|
|
221
|
+
prakim = [3];
|
|
222
|
+
break;
|
|
223
|
+
case 2:
|
|
224
|
+
prakim = [4];
|
|
225
|
+
break;
|
|
226
|
+
case 3:
|
|
227
|
+
prakim = [5];
|
|
228
|
+
break;
|
|
229
|
+
case 4:
|
|
230
|
+
prakim = [6];
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
break;
|
|
234
|
+
case 4:
|
|
235
|
+
switch (cShb) {
|
|
236
|
+
case 1:
|
|
237
|
+
prakim = [4, 5];
|
|
238
|
+
break;
|
|
239
|
+
case 2:
|
|
240
|
+
prakim = [6, 1];
|
|
241
|
+
break;
|
|
242
|
+
case 3:
|
|
243
|
+
prakim = [2, 3];
|
|
244
|
+
break;
|
|
245
|
+
case 4:
|
|
246
|
+
prakim = [4, 5, 6];
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
break;
|
|
250
|
+
case 5:
|
|
251
|
+
switch (cShb) {
|
|
252
|
+
case 1:
|
|
253
|
+
prakim = [5, 6];
|
|
254
|
+
break;
|
|
255
|
+
case 2:
|
|
256
|
+
prakim = [1, 2];
|
|
257
|
+
break;
|
|
258
|
+
case 3:
|
|
259
|
+
prakim = [3, 4];
|
|
260
|
+
break;
|
|
261
|
+
case 4:
|
|
262
|
+
prakim = [5, 6];
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
break;
|
|
266
|
+
case 6:
|
|
267
|
+
switch (cShb) {
|
|
268
|
+
case 1:
|
|
269
|
+
prakim = [6];
|
|
270
|
+
break;
|
|
271
|
+
case 2:
|
|
272
|
+
prakim = [1, 2];
|
|
273
|
+
break;
|
|
274
|
+
case 3:
|
|
275
|
+
prakim = [3, 4];
|
|
276
|
+
break;
|
|
277
|
+
case 4:
|
|
278
|
+
prakim = [5, 6];
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
return prakim || [];
|
|
284
|
+
};
|
|
285
|
+
var PirkeiAvos = _PirkeiAvos;
|
|
286
|
+
|
|
287
|
+
// src/JCal/Dafyomi.ts
|
|
288
|
+
var _Dafyomi = class _Dafyomi {
|
|
289
|
+
static getDaf(jdate) {
|
|
290
|
+
const absoluteDate = jdate.Abs;
|
|
291
|
+
let dafcnt = 40, cno, dno, osday, nsday, total, count, j, blatt;
|
|
292
|
+
osday = jDate.absSd(new Date(1923, 8, 11));
|
|
293
|
+
nsday = jDate.absSd(new Date(1975, 5, 24));
|
|
294
|
+
if (absoluteDate < osday)
|
|
295
|
+
return null;
|
|
296
|
+
if (absoluteDate >= nsday) {
|
|
297
|
+
cno = 8 + Utils.toInt((absoluteDate - nsday) / 2711);
|
|
298
|
+
dno = (absoluteDate - nsday) % 2711;
|
|
299
|
+
} else {
|
|
300
|
+
cno = 1 + Utils.toInt((absoluteDate - osday) / 2702);
|
|
301
|
+
dno = Utils.toInt((absoluteDate - osday) / 2702);
|
|
302
|
+
}
|
|
303
|
+
total = blatt = 0;
|
|
304
|
+
count = -1;
|
|
305
|
+
if (cno <= 7)
|
|
306
|
+
_Dafyomi.masechtaList[4].daf = 13;
|
|
307
|
+
else
|
|
308
|
+
_Dafyomi.masechtaList[4].daf = 22;
|
|
309
|
+
j = 0;
|
|
310
|
+
while (j < dafcnt) {
|
|
311
|
+
count++;
|
|
312
|
+
total = total + _Dafyomi.masechtaList[j].daf - 1;
|
|
313
|
+
if (dno < total) {
|
|
314
|
+
blatt = _Dafyomi.masechtaList[j].daf + 1 - (total - dno);
|
|
315
|
+
switch (count) {
|
|
316
|
+
case 36:
|
|
317
|
+
blatt = blatt + 21;
|
|
318
|
+
break;
|
|
319
|
+
case 37:
|
|
320
|
+
blatt = blatt + 24;
|
|
321
|
+
break;
|
|
322
|
+
case 38:
|
|
323
|
+
blatt = blatt + 33;
|
|
324
|
+
break;
|
|
325
|
+
default:
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
j = 1 + dafcnt;
|
|
329
|
+
}
|
|
330
|
+
j++;
|
|
331
|
+
}
|
|
332
|
+
return {
|
|
333
|
+
masechet: _Dafyomi.masechtaList[count],
|
|
334
|
+
daf: blatt
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
// Returns the name of the Masechta and daf number in English, For example: Sukkah, Daf 3
|
|
338
|
+
static toString(jd) {
|
|
339
|
+
const d = _Dafyomi.getDaf(jd);
|
|
340
|
+
if (d !== null) {
|
|
341
|
+
return d.masechet.eng + ", Daf " + d.daf.toString();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
//Returns the name of the Masechta and daf number in Hebrew. For example: 'סוכה דף כ.
|
|
345
|
+
static toStringHeb(jd) {
|
|
346
|
+
const d = _Dafyomi.getDaf(jd);
|
|
347
|
+
if (d !== null) {
|
|
348
|
+
return d.masechet.heb + " \u05D3\u05E3 " + Utils.toJewishNumber(d.daf);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
_Dafyomi.masechtaList = [
|
|
353
|
+
{ eng: "Berachos", heb: "\u05D1\u05E8\u05DB\u05D5\u05EA", daf: 64 },
|
|
354
|
+
{ eng: "Shabbos", heb: "\u05E9\u05D1\u05EA", daf: 157 },
|
|
355
|
+
{ eng: "Eruvin", heb: "\u05E2\u05E8\u05D5\u05D1\u05D9\u05DF", daf: 105 },
|
|
356
|
+
{ eng: "Pesachim", heb: "\u05E4\u05E1\u05D7\u05D9\u05DD", daf: 121 },
|
|
357
|
+
{ eng: "Shekalim", heb: "\u05E9\u05E7\u05DC\u05D9\u05DD", daf: 22 },
|
|
358
|
+
{ eng: "Yoma", heb: "\u05D9\u05D5\u05DE\u05D0", daf: 88 },
|
|
359
|
+
{ eng: "Sukkah", heb: "\u05E1\u05D5\u05DB\u05D4", daf: 56 },
|
|
360
|
+
{ eng: "Beitzah", heb: "\u05D1\u05D9\u05E6\u05D4", daf: 40 },
|
|
361
|
+
{ eng: "Rosh Hashana", heb: "\u05E8\u05D0\u05E9 \u05D4\u05E9\u05E0\u05D4", daf: 35 },
|
|
362
|
+
{ eng: "Taanis", heb: "\u05EA\u05E2\u05E0\u05D9\u05EA", daf: 31 },
|
|
363
|
+
{ eng: "Megillah", heb: "\u05DE\u05D2\u05D9\u05DC\u05D4", daf: 32 },
|
|
364
|
+
{ eng: "Moed Katan", heb: "\u05DE\u05D5\u05E2\u05D3 \u05E7\u05D8\u05DF", daf: 29 },
|
|
365
|
+
{ eng: "Chagigah", heb: "\u05D7\u05D2\u05D9\u05D2\u05D4", daf: 27 },
|
|
366
|
+
{ eng: "Yevamos", heb: "\u05D9\u05D1\u05DE\u05D5\u05EA", daf: 122 },
|
|
367
|
+
{ eng: "Kesubos", heb: "\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA", daf: 112 },
|
|
368
|
+
{ eng: "Nedarim", heb: "\u05E0\u05D3\u05E8\u05D9\u05DD", daf: 91 },
|
|
369
|
+
{ eng: "Nazir", heb: "\u05E0\u05D6\u05D9\u05E8", daf: 66 },
|
|
370
|
+
{ eng: "Sotah", heb: "\u05E1\u05D5\u05D8\u05D4", daf: 49 },
|
|
371
|
+
{ eng: "Gitin", heb: "\u05D2\u05D9\u05D8\u05D9\u05DF", daf: 90 },
|
|
372
|
+
{ eng: "Kiddushin", heb: "\u05E7\u05D3\u05D5\u05E9\u05D9\u05DF", daf: 82 },
|
|
373
|
+
{ eng: "Baba Kamma", heb: "\u05D1\u05D1\u05D0 \u05E7\u05DE\u05D0", daf: 119 },
|
|
374
|
+
{ eng: "Baba Metzia", heb: "\u05D1\u05D1\u05D0 \u05DE\u05E6\u05D9\u05E2\u05D0", daf: 119 },
|
|
375
|
+
{ eng: "Baba Basra", heb: "\u05D1\u05D1\u05D0 \u05D1\u05EA\u05E8\u05D0", daf: 176 },
|
|
376
|
+
{ eng: "Sanhedrin", heb: "\u05E1\u05E0\u05D4\u05D3\u05E8\u05D9\u05DF", daf: 113 },
|
|
377
|
+
{ eng: "Makkot", heb: "\u05DE\u05DB\u05D5\u05EA", daf: 24 },
|
|
378
|
+
{ eng: "Shevuot", heb: "\u05E9\u05D1\u05D5\u05E2\u05D5\u05EA", daf: 49 },
|
|
379
|
+
{ eng: "Avodah Zarah", heb: "\u05E2\u05D1\u05D5\u05D3\u05D4 \u05D6\u05E8\u05D4", daf: 76 },
|
|
380
|
+
{ eng: "Horayot", heb: "\u05D4\u05D5\u05E8\u05D9\u05D5\u05EA", daf: 14 },
|
|
381
|
+
{ eng: "Zevachim", heb: "\u05D6\u05D1\u05D7\u05D9\u05DD", daf: 120 },
|
|
382
|
+
{ eng: "Menachos", heb: "\u05DE\u05E0\u05D7\u05D5\u05EA", daf: 110 },
|
|
383
|
+
{ eng: "Chullin", heb: "\u05D7\u05D5\u05DC\u05D9\u05DF", daf: 142 },
|
|
384
|
+
{ eng: "Bechoros", heb: "\u05D1\u05DB\u05D5\u05E8\u05D5\u05EA", daf: 61 },
|
|
385
|
+
{ eng: "Arachin", heb: "\u05E2\u05E8\u05DB\u05D9\u05DF", daf: 34 },
|
|
386
|
+
{ eng: "Temurah", heb: "\u05EA\u05DE\u05D5\u05E8\u05D4", daf: 34 },
|
|
387
|
+
{ eng: "Kerisos", heb: "\u05DB\u05E8\u05D9\u05EA\u05D5\u05EA", daf: 28 },
|
|
388
|
+
{ eng: "Meilah", heb: "\u05DE\u05E2\u05D9\u05DC\u05D4", daf: 22 },
|
|
389
|
+
{ eng: "Kinnim", heb: "\u05E7\u05E0\u05D9\u05DD", daf: 4 },
|
|
390
|
+
{ eng: "Tamid", heb: "\u05EA\u05DE\u05D9\u05D3", daf: 10 },
|
|
391
|
+
{ eng: "Midos", heb: "\u05DE\u05D3\u05D5\u05EA", daf: 4 },
|
|
392
|
+
{ eng: "Niddah", heb: "\u05E0\u05D3\u05D4", daf: 73 }
|
|
393
|
+
];
|
|
394
|
+
var Dafyomi = _Dafyomi;
|
|
395
|
+
|
|
396
|
+
// src/JCal/jDate.ts
|
|
397
|
+
var _yearCache = [];
|
|
398
|
+
var JS_START_DATE_ABS = 719163;
|
|
399
|
+
var MS_PER_DAY = 864e5;
|
|
400
|
+
var JS_START_OFFSET = (/* @__PURE__ */ new Date(0)).getTimezoneOffset();
|
|
401
|
+
var jDate = class _jDate {
|
|
402
|
+
/**
|
|
403
|
+
* Create a new Jdate.
|
|
404
|
+
* new jDate() - Sets the Jewish Date for the current system date
|
|
405
|
+
* new jDate(javascriptDateObject) - Sets to the Jewish date on the given Gregorian date
|
|
406
|
+
* new jDate("January 1 2045") - Accepts any valid javascript Date string (uses javascripts new Date(string))
|
|
407
|
+
* new jDate(jewishYear, jewishMonth, jewishDay) - Months start at 1. Nissan is month 1 Adar Sheini is 13.
|
|
408
|
+
* new jDate(jewishYear, jewishMonth) - Same as above, with Day defaulting to 1
|
|
409
|
+
* new jDate( { year: 5776, month: 4, day: 5 } ) - same as new jDate(jewishYear, jewishMonth, jewishDay)
|
|
410
|
+
* new jDate( { year: 5776, month: 4 } ) - same as new jDate(jewishYear, jewishMonth)
|
|
411
|
+
* new jDate( { year: 5776 } ) - sets to the first day of Rosh Hashana on the given year
|
|
412
|
+
* new jDate(absoluteDate) - The number of days elapsed since the theoretical date Sunday, December 31, 0001 BCE
|
|
413
|
+
* new jDate(jewishYear, jewishMonth, jewishDay, absoluteDate) - Most efficient constructor. Needs no calculations at all.
|
|
414
|
+
* new jDate( { year: 5776, month: 4, day: 5, abs: 122548708 } ) - same as new jDate(jewishYear, jewishMonth, jewishDay, absoluteDate)
|
|
415
|
+
* @param {number | Date | string | {year:number,month:number,day:number} | [number, number, number, number]} [arg] The full Jewish year number OR Javascript Date object or string OR object or array of year, month, day
|
|
416
|
+
* @param {number} [month] The month of the Jewish date. Nissan is 1.
|
|
417
|
+
* @param {number} [day] The day of the month
|
|
418
|
+
* @param {number} [abs] The number of days that have passed since 12/31/0001
|
|
419
|
+
*/
|
|
420
|
+
constructor(arg, month, day, abs) {
|
|
421
|
+
this.Day = NaN;
|
|
422
|
+
this.Month = NaN;
|
|
423
|
+
this.Year = NaN;
|
|
424
|
+
this.Abs = NaN;
|
|
425
|
+
if (arguments.length === 0) {
|
|
426
|
+
this.fromAbs(_jDate.absSd(/* @__PURE__ */ new Date()));
|
|
427
|
+
} else if (arg instanceof Date) {
|
|
428
|
+
if (Utils.isValidDate(arg)) {
|
|
429
|
+
this.fromAbs(_jDate.absSd(arg));
|
|
430
|
+
} else {
|
|
431
|
+
throw "jDate constructor: The given Date is not a valid javascript Date";
|
|
432
|
+
}
|
|
433
|
+
} else if (Array.isArray(arg) && arg.length >= 3) {
|
|
434
|
+
this.Day = arg[0];
|
|
435
|
+
this.Month = arg[1];
|
|
436
|
+
this.Year = arg[2];
|
|
437
|
+
this.Abs = arg.length > 3 && arg[3] || _jDate.absJd(this.Year, this.Month, this.Day);
|
|
438
|
+
} else if (arg && Utils.isString(arg)) {
|
|
439
|
+
const d = new Date(arg);
|
|
440
|
+
if (Utils.isValidDate(d)) {
|
|
441
|
+
this.fromAbs(_jDate.absSd(d));
|
|
442
|
+
} else {
|
|
443
|
+
throw 'jDate constructor: The given string "' + arg + '" cannot be parsed into a Date';
|
|
444
|
+
}
|
|
445
|
+
} else if (Utils.isNumber(arg)) {
|
|
446
|
+
if (arguments.length === 1) {
|
|
447
|
+
this.fromAbs(arg);
|
|
448
|
+
} else {
|
|
449
|
+
this.Year = arg;
|
|
450
|
+
this.Month = month || 7;
|
|
451
|
+
this.Day = day || 1;
|
|
452
|
+
this.Abs = abs || _jDate.absJd(this.Year, this.Month, this.Day);
|
|
453
|
+
}
|
|
454
|
+
} else if (typeof arg === "object") {
|
|
455
|
+
const argObj = arg;
|
|
456
|
+
if (Utils.isNumber(argObj.year)) {
|
|
457
|
+
this.Day = argObj.day || 1;
|
|
458
|
+
this.Month = argObj.month || 7;
|
|
459
|
+
this.Year = argObj.year;
|
|
460
|
+
this.Abs = argObj.abs || _jDate.absJd(this.Year, this.Month, this.Day);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/**Sets the current Jewish date from the given absolute date*/
|
|
465
|
+
fromAbs(absolute) {
|
|
466
|
+
const ymd = _jDate.fromAbs(absolute);
|
|
467
|
+
this.Year = ymd.year;
|
|
468
|
+
this.Month = ymd.month;
|
|
469
|
+
this.Day = ymd.day;
|
|
470
|
+
this.Abs = absolute;
|
|
471
|
+
}
|
|
472
|
+
/**Returns a valid javascript Date object that represents the Gregorian date
|
|
473
|
+
that starts at midnight of the current Jewish date.*/
|
|
474
|
+
getDate() {
|
|
475
|
+
return _jDate.sdFromAbs(this.Abs);
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* @returns {number} The day of the week for the current Jewish date. Sunday is 0 and Shabbos is 6.
|
|
479
|
+
*/
|
|
480
|
+
getDayOfWeek() {
|
|
481
|
+
return Math.abs(this.Abs % 7);
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* @returns {number} The day of the week for the current Jewish date. Sunday is 0 and Shabbos is 6
|
|
485
|
+
*/
|
|
486
|
+
get DayOfWeek() {
|
|
487
|
+
return this.getDayOfWeek();
|
|
488
|
+
}
|
|
489
|
+
/**Returns a new Jewish date represented by adding the given number of days to the current Jewish date.*/
|
|
490
|
+
addDays(days) {
|
|
491
|
+
return new _jDate(this.Abs + days);
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Returns a new Jewish date represented by adding the given number of
|
|
495
|
+
* Jewish Months to the current Jewish date.
|
|
496
|
+
* If the current Day is 30 and the new month only has 29 days,
|
|
497
|
+
* the 29th day of the month is returned.
|
|
498
|
+
* @param {number} months
|
|
499
|
+
*/
|
|
500
|
+
addMonths(months) {
|
|
501
|
+
let year = this.Year, month = this.Month, day = this.Day, miy = _jDate.monthsJYear(year);
|
|
502
|
+
for (let i = 0; i < Math.abs(months); i++) {
|
|
503
|
+
if (months > 0) {
|
|
504
|
+
month += 1;
|
|
505
|
+
if (month > miy) {
|
|
506
|
+
month = 1;
|
|
507
|
+
}
|
|
508
|
+
if (month === 7) {
|
|
509
|
+
year += 1;
|
|
510
|
+
miy = _jDate.monthsJYear(year);
|
|
511
|
+
}
|
|
512
|
+
} else if (months < 0) {
|
|
513
|
+
month -= 1;
|
|
514
|
+
if (month === 0) {
|
|
515
|
+
month = miy;
|
|
516
|
+
}
|
|
517
|
+
if (month === 6) {
|
|
518
|
+
year -= 1;
|
|
519
|
+
miy = _jDate.monthsJYear(year);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
if (day === 30 && _jDate.daysJMonth(year, month) === 29) {
|
|
524
|
+
day = 29;
|
|
525
|
+
}
|
|
526
|
+
return new _jDate(year, month, day);
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Returns a new Jewish date represented by adding the
|
|
530
|
+
* given number of Jewish Years to the current Jewish date.
|
|
531
|
+
* If the current Day is 30 and the new dates month only has 29 days,
|
|
532
|
+
* the 29th day of the month is returned.
|
|
533
|
+
* @param {number} years
|
|
534
|
+
*/
|
|
535
|
+
addYears(years) {
|
|
536
|
+
let year = this.Year + years, month = this.Month, day = this.Day;
|
|
537
|
+
if (month === 13 && !_jDate.isJdLeapY(year)) {
|
|
538
|
+
month = 12;
|
|
539
|
+
} else if (month === 8 && day === 30 && !_jDate.isLongCheshvan(year)) {
|
|
540
|
+
month = 9;
|
|
541
|
+
day = 1;
|
|
542
|
+
} else if (month === 9 && day === 30 && _jDate.isShortKislev(year)) {
|
|
543
|
+
month = 10;
|
|
544
|
+
day = 1;
|
|
545
|
+
}
|
|
546
|
+
if (day === 30 && _jDate.daysJMonth(year, month) === 29) {
|
|
547
|
+
day = 29;
|
|
548
|
+
}
|
|
549
|
+
return new _jDate(year, month, day);
|
|
550
|
+
}
|
|
551
|
+
addSecularMonths(months) {
|
|
552
|
+
const secDate = new Date(this.getDate().valueOf());
|
|
553
|
+
secDate.setMonth(secDate.getMonth() + months);
|
|
554
|
+
return new _jDate(secDate);
|
|
555
|
+
}
|
|
556
|
+
addSecularYears(years) {
|
|
557
|
+
const secDate = new Date(this.getDate().valueOf());
|
|
558
|
+
secDate.setFullYear(secDate.getFullYear() + years);
|
|
559
|
+
return new _jDate(secDate);
|
|
560
|
+
}
|
|
561
|
+
/**Gets the number of days separating this Jewish Date and the given one.
|
|
562
|
+
*
|
|
563
|
+
* If the given date is before this one, the number will be negative.
|
|
564
|
+
* @param {jDate} jd
|
|
565
|
+
* */
|
|
566
|
+
diffDays(jd) {
|
|
567
|
+
return jd.Abs - this.Abs;
|
|
568
|
+
}
|
|
569
|
+
/**Gets the number of months separating this Jewish Date and the given one.
|
|
570
|
+
*
|
|
571
|
+
* Ignores the Day property:
|
|
572
|
+
*
|
|
573
|
+
* jDate.toJDate(5777, 6, 29).diffMonths(jDate.toJDate(5778, 7, 1)) will return 1 even though they are a day apart.
|
|
574
|
+
*
|
|
575
|
+
* If the given date is before this one, the number will be negative.
|
|
576
|
+
* @param {jDate} jd
|
|
577
|
+
* */
|
|
578
|
+
diffMonths(jd) {
|
|
579
|
+
let month = jd.Month, year = jd.Year, months = 0;
|
|
580
|
+
while (!(year === this.Year && month === this.Month)) {
|
|
581
|
+
if (this.Abs > jd.Abs) {
|
|
582
|
+
months--;
|
|
583
|
+
month++;
|
|
584
|
+
if (month > _jDate.monthsJYear(year)) {
|
|
585
|
+
month = 1;
|
|
586
|
+
} else if (month === 7) {
|
|
587
|
+
year++;
|
|
588
|
+
}
|
|
589
|
+
} else {
|
|
590
|
+
months++;
|
|
591
|
+
month--;
|
|
592
|
+
if (month < 1) {
|
|
593
|
+
month = _jDate.monthsJYear(year);
|
|
594
|
+
} else if (month === 6) {
|
|
595
|
+
year--;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return months;
|
|
600
|
+
}
|
|
601
|
+
/**Gets the number of full months separating this Jewish Date and the given one.
|
|
602
|
+
* If the given date is before this one, the number will be negative.
|
|
603
|
+
* @param {jDate} jd
|
|
604
|
+
* */
|
|
605
|
+
diffFullMonths(jd) {
|
|
606
|
+
let months = this.diffMonths(jd);
|
|
607
|
+
if (months >= 0 && this.Day > jd.Day) {
|
|
608
|
+
months--;
|
|
609
|
+
} else if (months < 0 && this.Day < jd.Day) {
|
|
610
|
+
months++;
|
|
611
|
+
}
|
|
612
|
+
return months;
|
|
613
|
+
}
|
|
614
|
+
/**Gets the number of years separating this Jewish Date and the given one.
|
|
615
|
+
*
|
|
616
|
+
* Ignores the Day and Month properties:
|
|
617
|
+
*
|
|
618
|
+
* jDate.toJDate(5777, 6, 29).diffYears(jDate.toJDate(5778, 7, 1)) will return 1 even though they are a day apart.
|
|
619
|
+
*
|
|
620
|
+
* If the given date is before this one, the number will be negative.
|
|
621
|
+
* @param {jDate} jd*/
|
|
622
|
+
diffYears(jd) {
|
|
623
|
+
let diff = jd.Year - this.Year;
|
|
624
|
+
if (this.Month < jd.Month || this.Month === jd.Month && this.Day < jd.Day) {
|
|
625
|
+
diff--;
|
|
626
|
+
}
|
|
627
|
+
return diff;
|
|
628
|
+
}
|
|
629
|
+
/**Gets the number of full years separating this Jewish Date and the given one.
|
|
630
|
+
* If the given date is before this one, the number will be negative.
|
|
631
|
+
* @param {jDate} jd*/
|
|
632
|
+
diffFullYears(jd) {
|
|
633
|
+
let diff = jd.Year - this.Year;
|
|
634
|
+
if (diff >= 0 && (this.Month > jd.Month || this.Month === jd.Month && this.Day > jd.Day)) {
|
|
635
|
+
diff--;
|
|
636
|
+
} else if (diff < 0 && (this.Month < jd.Month || this.Month === jd.Month && this.Day < jd.Day)) {
|
|
637
|
+
diff++;
|
|
638
|
+
}
|
|
639
|
+
return diff;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Returns the current Jewish date in the format: Thursday, the 3rd of Kislev 5776.
|
|
643
|
+
* @param {boolean} hideDayOfWeek
|
|
644
|
+
* @param {boolean} dontCapitalize
|
|
645
|
+
*/
|
|
646
|
+
toString(hideDayOfWeek, dontCapitalize) {
|
|
647
|
+
return (hideDayOfWeek ? dontCapitalize ? "t" : "T" : DaysOfWeekEng[this.getDayOfWeek()] + ", t") + "he " + Utils.toSuffixed(this.Day) + " of " + this.monthName();
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Returns the current Jewish date in the format "[Tuesday] Nissan 3, 5778"
|
|
651
|
+
* @param {boolean} showDow - show day of week?
|
|
652
|
+
*/
|
|
653
|
+
toShortstring(showDow) {
|
|
654
|
+
return (showDow ? DaysOfWeekEng[this.getDayOfWeek()] + " " : "") + JewishMonthsEng[this.Month] + " " + this.Day.toString() + ", " + this.Year.toString();
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Returns the current Jewish date in the format "Nissan 5778"
|
|
658
|
+
* @param {boolean} showYear - show the year number?
|
|
659
|
+
*/
|
|
660
|
+
monthName(showYear = true) {
|
|
661
|
+
return JewishMonthsEng[this.Month] + (this.Month === 12 && _jDate.isJdLeapY(this.Year) ? " Rishon " : " ") + (showYear ? this.Year.toString() : "");
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו
|
|
665
|
+
* @param hideDayOfWeek When set to truthy, hides the day of the week
|
|
666
|
+
*/
|
|
667
|
+
toStringHeb(hideDayOfWeek) {
|
|
668
|
+
return (!hideDayOfWeek ? DaysOfWeekHeb[this.getDayOfWeek()] + " " : "") + Utils.toJewishNumber(this.Day) + " " + JewishMonthsHeb[this.Month] + (this.Month === 12 && _jDate.isJdLeapY(this.Year) ? " \u05E8\u05D0\u05E9\u05D5\u05DF " : " ") + Utils.toJewishNumber(this.Year % 1e3);
|
|
669
|
+
}
|
|
670
|
+
/**Gets the day of the omer for the current Jewish date. If the date is not during sefira, 0 is returned.*/
|
|
671
|
+
getDayOfOmer() {
|
|
672
|
+
let dayOfOmer = 0;
|
|
673
|
+
if (this.Month === 1 && this.Day > 15 || this.Month === 2 || this.Month === 3 && this.Day < 6) {
|
|
674
|
+
const first = new _jDate(this.Year, 1, 15);
|
|
675
|
+
dayOfOmer = first.diffDays(this);
|
|
676
|
+
}
|
|
677
|
+
return dayOfOmer;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Returns true if this day is yomtov or chol hamoed
|
|
681
|
+
* @param {boolean} israel
|
|
682
|
+
*/
|
|
683
|
+
isYomTovOrCholHamoed(israel2) {
|
|
684
|
+
return this.isYomTov(israel2) || this.Month === 1 && [16, 17, 18, 19, 20].includes(this.Day) || this.Month === 7 && [16, 17, 18, 19, 20, 21].includes(this.Day);
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Returns true if this day is yomtov
|
|
688
|
+
* @param {boolean} israel
|
|
689
|
+
*/
|
|
690
|
+
isYomTov(israel2) {
|
|
691
|
+
const day = this.Day;
|
|
692
|
+
switch (this.Month) {
|
|
693
|
+
case 1:
|
|
694
|
+
if (day === 15 || day === 21)
|
|
695
|
+
return true;
|
|
696
|
+
if (!israel2 && (day === 16 || day === 22))
|
|
697
|
+
return true;
|
|
698
|
+
break;
|
|
699
|
+
case 3:
|
|
700
|
+
if (day === 6 || !israel2 && day === 7)
|
|
701
|
+
return true;
|
|
702
|
+
break;
|
|
703
|
+
case 7:
|
|
704
|
+
if ([1, 2, 10, 15, 22].includes(day)) {
|
|
705
|
+
return true;
|
|
706
|
+
}
|
|
707
|
+
if (!israel2 && (day === 16 || day === 23))
|
|
708
|
+
return true;
|
|
709
|
+
break;
|
|
710
|
+
}
|
|
711
|
+
return false;
|
|
712
|
+
}
|
|
713
|
+
/**Is today Erev Yom Tov? (includes Erev second days of Sukkos and Pesach) */
|
|
714
|
+
isErevYomTov() {
|
|
715
|
+
return this.Month === 1 && Utils.has(this.Day, 14, 20) || this.Month === 3 && this.Day === 5 || this.Month === 6 && this.Day === 29 || this.Month === 7 && Utils.has(this.Day, 9, 14, 21);
|
|
716
|
+
}
|
|
717
|
+
/**Does the current Jewish date have candle lighting before sunset?*/
|
|
718
|
+
hasCandleLighting() {
|
|
719
|
+
const dow = this.getDayOfWeek();
|
|
720
|
+
if (dow === 5) {
|
|
721
|
+
return true;
|
|
722
|
+
} else if (dow === 6) {
|
|
723
|
+
return false;
|
|
724
|
+
}
|
|
725
|
+
return this.isErevYomTov();
|
|
726
|
+
}
|
|
727
|
+
/**Is the current Jewish Date the day before a yomtov that contains a Friday?*/
|
|
728
|
+
hasEiruvTavshilin(israel2) {
|
|
729
|
+
let dow = this.getDayOfWeek();
|
|
730
|
+
return (
|
|
731
|
+
//Eiruv Tavshilin is only on Wednesday or Thursday
|
|
732
|
+
[3, 4].includes(dow) && //today is Erev Yomtov
|
|
733
|
+
this.isErevYomTov() && //Thursday OR Wednesday when in Chu"l or Erev Rosh Hashana anywhere
|
|
734
|
+
(dow === 4 || dow === 3 && (!israel2 || this.Month === 6)) && //No Eiruv Tavshilin on Erev yom kippur
|
|
735
|
+
this.Day !== 9
|
|
736
|
+
);
|
|
737
|
+
}
|
|
738
|
+
/**Gets the candle lighting time for the current Jewish date for the given Location object.*/
|
|
739
|
+
getCandleLighting(location, nullIfNoCandles) {
|
|
740
|
+
if (!location) {
|
|
741
|
+
throw "To get sunrise and sunset, the location needs to be supplied";
|
|
742
|
+
}
|
|
743
|
+
if (this.hasCandleLighting()) {
|
|
744
|
+
return Zmanim.getCandleLighting(this, location);
|
|
745
|
+
} else if (nullIfNoCandles) {
|
|
746
|
+
return null;
|
|
747
|
+
} else {
|
|
748
|
+
throw "No candle lighting on " + this.toString();
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
/**Get the sedra of the week for the current Jewish date.*/
|
|
752
|
+
getSedra(israel2) {
|
|
753
|
+
return new Sedra(this, israel2);
|
|
754
|
+
}
|
|
755
|
+
/**Get the prakim of Pirkei Avos for the current Jewish date.*/
|
|
756
|
+
getPirkeiAvos(israel2) {
|
|
757
|
+
return PirkeiAvos.getPrakim(this, israel2);
|
|
758
|
+
}
|
|
759
|
+
/**Gets sunrise and sunset time for the current Jewish date at the given Location.
|
|
760
|
+
*
|
|
761
|
+
* Return format: {sunrise: {hour: 6, minute: 18}, sunset: {hour: 19, minute: 41}}*/
|
|
762
|
+
getSunriseSunset(location, ignoreElevation) {
|
|
763
|
+
if (!location) {
|
|
764
|
+
throw "To get sunrise and sunset, the location needs to be supplied";
|
|
765
|
+
}
|
|
766
|
+
return Zmanim.getSunTimes(this, location, !ignoreElevation);
|
|
767
|
+
}
|
|
768
|
+
/**Gets Chatzos for both the day and the night for the current Jewish date at the given Location.
|
|
769
|
+
*
|
|
770
|
+
*Return format: {hour: 11, minute: 48}*/
|
|
771
|
+
getChatzos(location) {
|
|
772
|
+
if (!location) {
|
|
773
|
+
throw "To get Chatzos, the location needs to be supplied";
|
|
774
|
+
}
|
|
775
|
+
return Zmanim.getChatzos(this, location);
|
|
776
|
+
}
|
|
777
|
+
/**Gets the length of a single Sha'a Zmanis in minutes for the current Jewish date at the given Location.*/
|
|
778
|
+
getShaaZmanis(location, offset) {
|
|
779
|
+
if (!location) {
|
|
780
|
+
throw "To get the Shaa Zmanis, the location needs to be supplied";
|
|
781
|
+
}
|
|
782
|
+
return Zmanim.getShaaZmanis(this, location, offset);
|
|
783
|
+
}
|
|
784
|
+
/**Returns the daily daf in English. For example: Sukkah, Daf 3.*/
|
|
785
|
+
getDafYomi() {
|
|
786
|
+
return Dafyomi.toString(this) || "";
|
|
787
|
+
}
|
|
788
|
+
/**Gets the daily daf in Hebrew. For example: 'סוכה דף כ.*/
|
|
789
|
+
getDafyomiHeb() {
|
|
790
|
+
return Dafyomi.toStringHeb(this) || "";
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Converts its argument/s to a Jewish Date.
|
|
794
|
+
* Samples of use:
|
|
795
|
+
* To get the current Jewish Date: jDate.toJDate(new Date()).
|
|
796
|
+
* To print out the current date in English: jDate.toJDate(new Date()).toString()
|
|
797
|
+
* To print out the current date in Hebrew: jDate.toJDate(new Date()).toStringHeb()
|
|
798
|
+
*
|
|
799
|
+
* Arguments to the jDate.toJDate function can be one of the following:
|
|
800
|
+
* jDate.toJDate() - Sets the Jewish Date for the current system date
|
|
801
|
+
* jDate.toJDate(Date) - Sets to the Jewish date on the given Javascript Date object
|
|
802
|
+
* jDate.toJDate("January 1 2045") - Accepts any valid Javascript Date string (uses string constructor of Date object)
|
|
803
|
+
* jDate.toJDate(jewishYear, jewishMonth, jewishDay) - Months start at 1. Nissan is month 1 Adara Sheini is 13.
|
|
804
|
+
* jDate.toJDate(jewishYear, jewishMonth) - Same as above, with Day defaulting to 1
|
|
805
|
+
* jDate.toJDate(jewishYear) - sets to the first day of Rosh Hashana on the given year
|
|
806
|
+
* jDate.toJDate( { year: 5776, month: 4, day: 5 } ) - Months start at 1. Nissan is month 1 Adara Sheini is 13.
|
|
807
|
+
* jDate.toJDate( { year: 5776, month: 4 } ) - Same as above, with Day defaulting to 1
|
|
808
|
+
* jDate.toJDate( { year: 5776 } ) - sets to the first day of Rosh Hashana on the given year
|
|
809
|
+
* jDate.toJDate(jewishYear, jewishMonth, jewishDay, absoluteDate) - Most efficient. Needs no calculations at all. The absoluteDate is the number of days elapsed since the theoretical date Sunday, December 31, 0001 BCE.
|
|
810
|
+
* jDate.toJDate( { year: 5776, month: 4, day: 5, abs: 122548708 } ) - same as jDate.toJDate(jewishYear, jewishMonth, jewishDay, absoluteDate)
|
|
811
|
+
****************************************************************************************************************/
|
|
812
|
+
static toJDate(arg, month, day, abs) {
|
|
813
|
+
if (arguments.length === 0) {
|
|
814
|
+
return new _jDate();
|
|
815
|
+
} else if (Utils.isNumber(arg) && arguments.length === 1) {
|
|
816
|
+
return new _jDate(arg, 7, 1);
|
|
817
|
+
} else {
|
|
818
|
+
return new _jDate(arg, month, day, abs);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
static now() {
|
|
822
|
+
return new _jDate();
|
|
823
|
+
}
|
|
824
|
+
/**Calculate the Jewish year, month and day for the given absolute date.*/
|
|
825
|
+
static fromAbs(absDay) {
|
|
826
|
+
let year = 3761 + Utils.toInt(absDay / (absDay > 0 ? 366 : 300)), month, day;
|
|
827
|
+
while (absDay >= _jDate.absJd(year + 1, 7, 1)) {
|
|
828
|
+
year++;
|
|
829
|
+
}
|
|
830
|
+
month = absDay < _jDate.absJd(year, 1, 1) ? 7 : 1;
|
|
831
|
+
while (absDay > _jDate.absJd(year, month, _jDate.daysJMonth(year, month))) {
|
|
832
|
+
month++;
|
|
833
|
+
}
|
|
834
|
+
day = absDay - _jDate.absJd(year, month, 1) + 1;
|
|
835
|
+
return { year, month, day };
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Gets the absolute date of the given javascript Date object.
|
|
839
|
+
* @param {Date} date
|
|
840
|
+
*/
|
|
841
|
+
static absSd(date) {
|
|
842
|
+
const ms = date.valueOf() - date.getTimezoneOffset() * 6e4, numFullDays = Math.floor(ms / MS_PER_DAY);
|
|
843
|
+
return JS_START_DATE_ABS + numFullDays;
|
|
844
|
+
}
|
|
845
|
+
/**Calculate the absolute date for the given Jewish Date.*/
|
|
846
|
+
static absJd(year, month, day) {
|
|
847
|
+
let dayInYear = day;
|
|
848
|
+
if (month < 7) {
|
|
849
|
+
let m = 7;
|
|
850
|
+
while (m <= _jDate.monthsJYear(year)) {
|
|
851
|
+
dayInYear += _jDate.daysJMonth(year, m);
|
|
852
|
+
m++;
|
|
853
|
+
}
|
|
854
|
+
m = 1;
|
|
855
|
+
while (m < month) {
|
|
856
|
+
dayInYear += _jDate.daysJMonth(year, m);
|
|
857
|
+
m++;
|
|
858
|
+
}
|
|
859
|
+
} else {
|
|
860
|
+
let m = 7;
|
|
861
|
+
while (m < month) {
|
|
862
|
+
dayInYear += _jDate.daysJMonth(year, m);
|
|
863
|
+
m++;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
return dayInYear + (_jDate.tDays(year) + -1373429);
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Gets a javascript date from an absolute date
|
|
870
|
+
*/
|
|
871
|
+
static sdFromAbs(abs) {
|
|
872
|
+
const offset = JS_START_OFFSET > 0 ? 1 : 0, daysSinceStart = abs - JS_START_DATE_ABS + offset;
|
|
873
|
+
return new Date(daysSinceStart * MS_PER_DAY);
|
|
874
|
+
}
|
|
875
|
+
/**number of days in the given Jewish Month. Nissan is 1 and Adar Sheini is 13.*/
|
|
876
|
+
static daysJMonth(year, month) {
|
|
877
|
+
switch (month) {
|
|
878
|
+
case 1:
|
|
879
|
+
case 3:
|
|
880
|
+
case 5:
|
|
881
|
+
case 7:
|
|
882
|
+
case 11:
|
|
883
|
+
return 30;
|
|
884
|
+
case 2:
|
|
885
|
+
case 4:
|
|
886
|
+
case 6:
|
|
887
|
+
case 10:
|
|
888
|
+
case 13:
|
|
889
|
+
return 29;
|
|
890
|
+
case 8:
|
|
891
|
+
return _jDate.isLongCheshvan(year) ? 30 : 29;
|
|
892
|
+
case 9:
|
|
893
|
+
return _jDate.isShortKislev(year) ? 29 : 30;
|
|
894
|
+
case 12:
|
|
895
|
+
return _jDate.isJdLeapY(year) ? 30 : 29;
|
|
896
|
+
}
|
|
897
|
+
return 0;
|
|
898
|
+
}
|
|
899
|
+
/**Elapsed days since creation of the world until Rosh Hashana of the given year*/
|
|
900
|
+
static tDays(year) {
|
|
901
|
+
const cached = _yearCache.find((y) => !!y && y.year === year);
|
|
902
|
+
if (cached) {
|
|
903
|
+
return cached.elapsed;
|
|
904
|
+
}
|
|
905
|
+
const months = Utils.toInt(
|
|
906
|
+
235 * Utils.toInt((year - 1) / 19) + // Leap months this cycle
|
|
907
|
+
12 * ((year - 1) % 19) + // Regular months in this cycle.
|
|
908
|
+
(7 * ((year - 1) % 19) + 1) / 19
|
|
909
|
+
), parts = 204 + 793 * (months % 1080), hours = 5 + 12 * months + 793 * Utils.toInt(months / 1080) + Utils.toInt(parts / 1080), conjDay = Utils.toInt(1 + 29 * months + hours / 24), conjParts = 1080 * (hours % 24) + parts % 1080;
|
|
910
|
+
let altDay;
|
|
911
|
+
if (conjParts >= 19440 || conjDay % 7 === 2 && conjParts >= 9924 && !_jDate.isJdLeapY(year) || conjDay % 7 === 1 && conjParts >= 16789 && _jDate.isJdLeapY(year - 1)) {
|
|
912
|
+
altDay = conjDay + 1;
|
|
913
|
+
} else {
|
|
914
|
+
altDay = conjDay;
|
|
915
|
+
}
|
|
916
|
+
if (Utils.has(altDay % 7, 0, 3, 5)) {
|
|
917
|
+
altDay += 1;
|
|
918
|
+
}
|
|
919
|
+
_yearCache.push({ year, elapsed: altDay });
|
|
920
|
+
return altDay;
|
|
921
|
+
}
|
|
922
|
+
/**number of days in the given Jewish Year.*/
|
|
923
|
+
static daysJYear(year) {
|
|
924
|
+
return _jDate.tDays(year + 1) - _jDate.tDays(year);
|
|
925
|
+
}
|
|
926
|
+
/**Does Cheshvan for the given Jewish Year have 30 days?*/
|
|
927
|
+
static isLongCheshvan(year) {
|
|
928
|
+
return _jDate.daysJYear(year) % 10 === 5;
|
|
929
|
+
}
|
|
930
|
+
/**Does Kislev for the given Jewish Year have 29 days?*/
|
|
931
|
+
static isShortKislev(year) {
|
|
932
|
+
return _jDate.daysJYear(year) % 10 === 3;
|
|
933
|
+
}
|
|
934
|
+
/**Does the given Jewish Year have 13 months?*/
|
|
935
|
+
static isJdLeapY(year) {
|
|
936
|
+
return (7 * year + 1) % 19 < 7;
|
|
937
|
+
}
|
|
938
|
+
/**number of months in Jewish Year.*/
|
|
939
|
+
static monthsJYear(year) {
|
|
940
|
+
return _jDate.isJdLeapY(year) ? 13 : 12;
|
|
941
|
+
}
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
// src/JCal/Zmanim.ts
|
|
945
|
+
var Zmanim = class _Zmanim {
|
|
946
|
+
/**
|
|
947
|
+
* Gets sunrise and sunset time for given date and Location.
|
|
948
|
+
* Accepts a javascript Date object, a string for creating a javascript date object or a jDate object.
|
|
949
|
+
* Location object is required.
|
|
950
|
+
* @returns {SunTimes}
|
|
951
|
+
* @param {Date | jDate} date A Javascript Date or Jewish Date for which to calculate the sun times.
|
|
952
|
+
* @param {Location} location Where on the globe to calculate the sun times for.
|
|
953
|
+
* @param {Boolean} considerElevation
|
|
954
|
+
*/
|
|
955
|
+
static getSunTimes(date, location, considerElevation = true) {
|
|
956
|
+
if (date instanceof jDate) {
|
|
957
|
+
date = date.getDate();
|
|
958
|
+
} else if (date instanceof String) {
|
|
959
|
+
date = new Date(date);
|
|
960
|
+
}
|
|
961
|
+
if (!Utils.isValidDate(date)) {
|
|
962
|
+
throw "Zmanim.getSunTimes: supplied date parameter cannot be converted to a Date";
|
|
963
|
+
}
|
|
964
|
+
let sunrise, sunset, zenithDeg = 90, zenithMin = 50, lonHour = 0, longitude = 0, latitude = 0, cosLat = 0, sinLat = 0, cosZen = 0, sinDec = 0, cosDec = 0, xmRise = 0, xmSet = 0, xlRise = 0, xlSet = 0, aRise = 0, aSet = 0, ahrRise = 0, ahrSet = 0, hRise = 0, hSet = 0, tRise = 0, tSet = 0, utRise = 0, utSet = 0;
|
|
965
|
+
const day = _Zmanim.dayOfYear(date), earthRadius = 6356900, zenithAtElevation = _Zmanim.degToDec(zenithDeg, zenithMin) + _Zmanim.radToDeg(Math.acos(earthRadius / (earthRadius + (considerElevation ? location.Elevation : 0))));
|
|
966
|
+
zenithDeg = Math.floor(zenithAtElevation);
|
|
967
|
+
zenithMin = (zenithAtElevation - zenithDeg) * 60;
|
|
968
|
+
cosZen = Math.cos(0.01745 * _Zmanim.degToDec(zenithDeg, zenithMin));
|
|
969
|
+
longitude = location.Longitude;
|
|
970
|
+
lonHour = longitude / 15;
|
|
971
|
+
latitude = location.Latitude;
|
|
972
|
+
cosLat = Math.cos(0.01745 * latitude);
|
|
973
|
+
sinLat = Math.sin(0.01745 * latitude);
|
|
974
|
+
tRise = day + (6 + lonHour) / 24;
|
|
975
|
+
tSet = day + (18 + lonHour) / 24;
|
|
976
|
+
xmRise = _Zmanim.M(tRise);
|
|
977
|
+
xlRise = _Zmanim.L(xmRise);
|
|
978
|
+
xmSet = _Zmanim.M(tSet);
|
|
979
|
+
xlSet = _Zmanim.L(xmSet);
|
|
980
|
+
aRise = 57.29578 * Math.atan(0.91746 * Math.tan(0.01745 * xlRise));
|
|
981
|
+
aSet = 57.29578 * Math.atan(0.91746 * Math.tan(0.01745 * xlSet));
|
|
982
|
+
if (Math.abs(aRise + 360 - xlRise) > 90) {
|
|
983
|
+
aRise += 180;
|
|
984
|
+
}
|
|
985
|
+
if (aRise > 360) {
|
|
986
|
+
aRise -= 360;
|
|
987
|
+
}
|
|
988
|
+
if (Math.abs(aSet + 360 - xlSet) > 90) {
|
|
989
|
+
aSet += 180;
|
|
990
|
+
}
|
|
991
|
+
if (aSet > 360) {
|
|
992
|
+
aSet -= 360;
|
|
993
|
+
}
|
|
994
|
+
ahrRise = aRise / 15;
|
|
995
|
+
sinDec = 0.39782 * Math.sin(0.01745 * xlRise);
|
|
996
|
+
cosDec = Math.sqrt(1 - sinDec * sinDec);
|
|
997
|
+
hRise = (cosZen - sinDec * sinLat) / (cosDec * cosLat);
|
|
998
|
+
ahrSet = aSet / 15;
|
|
999
|
+
sinDec = 0.39782 * Math.sin(0.01745 * xlSet);
|
|
1000
|
+
cosDec = Math.sqrt(1 - sinDec * sinDec);
|
|
1001
|
+
hSet = (cosZen - sinDec * sinLat) / (cosDec * cosLat);
|
|
1002
|
+
if (Math.abs(hRise) <= 1) {
|
|
1003
|
+
hRise = 57.29578 * Math.acos(hRise);
|
|
1004
|
+
utRise = (360 - hRise) / 15 + ahrRise + _Zmanim.adj(tRise) + lonHour;
|
|
1005
|
+
sunrise = _Zmanim.timeAdj(utRise + location.UTCOffset, date, location);
|
|
1006
|
+
if (sunrise.hour > 12) {
|
|
1007
|
+
sunrise.hour -= 12;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
if (Math.abs(hSet) <= 1) {
|
|
1011
|
+
hSet = 57.29578 * Math.acos(hSet);
|
|
1012
|
+
utSet = hRise / 15 + ahrSet + _Zmanim.adj(tSet) + lonHour;
|
|
1013
|
+
sunset = _Zmanim.timeAdj(utSet + location.UTCOffset, date, location);
|
|
1014
|
+
if (sunset.hour > 0 && sunset.hour < 12) {
|
|
1015
|
+
sunset.hour += 12;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
return { sunrise, sunset };
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* @param {jDate | Date} date
|
|
1022
|
+
* @param {Location} location
|
|
1023
|
+
*/
|
|
1024
|
+
static getChatzos(date, location) {
|
|
1025
|
+
return _Zmanim.getChatzosFromSuntimes(
|
|
1026
|
+
_Zmanim.getSunTimes(date, location, false)
|
|
1027
|
+
);
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* @param {SunTimes} sunTimes
|
|
1031
|
+
*/
|
|
1032
|
+
static getChatzosFromSuntimes(sunTimes) {
|
|
1033
|
+
const rise = sunTimes.sunrise, set = sunTimes.sunset;
|
|
1034
|
+
if (rise === void 0 || isNaN(rise.hour) || set === void 0 || isNaN(set.hour)) {
|
|
1035
|
+
return { hour: NaN, minute: NaN };
|
|
1036
|
+
}
|
|
1037
|
+
const chatz = Utils.toInt((Utils.totalSeconds(set) - Utils.totalSeconds(rise)) / 2);
|
|
1038
|
+
return Utils.addSeconds(rise, chatz);
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* @param {jDate | Date} date
|
|
1042
|
+
* @param {Location} location
|
|
1043
|
+
* @param {any} offset
|
|
1044
|
+
*/
|
|
1045
|
+
static getShaaZmanis(date, location, offset) {
|
|
1046
|
+
return _Zmanim.getShaaZmanisFromSunTimes(
|
|
1047
|
+
_Zmanim.getSunTimes(date, location, false),
|
|
1048
|
+
offset
|
|
1049
|
+
);
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* @param {{ sunrise: any; sunset: any; }} sunTimes
|
|
1053
|
+
* @param {number} [offset]
|
|
1054
|
+
*/
|
|
1055
|
+
static getShaaZmanisFromSunTimes(sunTimes, offset) {
|
|
1056
|
+
if (!sunTimes || !sunTimes.sunrise || !sunTimes.sunset) {
|
|
1057
|
+
return 0;
|
|
1058
|
+
}
|
|
1059
|
+
let rise = sunTimes.sunrise, set = sunTimes.sunset;
|
|
1060
|
+
if (!rise || isNaN(rise.hour) || !set || isNaN(set.hour)) {
|
|
1061
|
+
return NaN;
|
|
1062
|
+
}
|
|
1063
|
+
if (offset) {
|
|
1064
|
+
rise = Utils.addMinutes(rise, -offset);
|
|
1065
|
+
set = Utils.addMinutes(set, offset);
|
|
1066
|
+
}
|
|
1067
|
+
return (Utils.totalSeconds(set) - Utils.totalSeconds(rise)) / 720;
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* @param {{ sunrise: any; sunset: any; }} sunTimes
|
|
1071
|
+
* @param {boolean} israel
|
|
1072
|
+
*/
|
|
1073
|
+
static getShaaZmanisMga(sunTimes, israel2) {
|
|
1074
|
+
const minutes = israel2 ? 90 : 72;
|
|
1075
|
+
let rise = sunTimes.sunrise && Utils.addMinutes(sunTimes.sunrise, -minutes), set = sunTimes.sunset && Utils.addMinutes(sunTimes.sunset, minutes);
|
|
1076
|
+
if (!rise || isNaN(rise.hour) || !set || isNaN(set.hour)) {
|
|
1077
|
+
return NaN;
|
|
1078
|
+
}
|
|
1079
|
+
return (Utils.totalSeconds(set) - Utils.totalSeconds(rise)) / 720;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* @param {jDate | Date} date
|
|
1083
|
+
* @param {Location} location
|
|
1084
|
+
*/
|
|
1085
|
+
static getCandleLighting(date, location) {
|
|
1086
|
+
return _Zmanim.getCandleLightingFromSunTimes(
|
|
1087
|
+
_Zmanim.getSunTimes(date, location),
|
|
1088
|
+
location
|
|
1089
|
+
);
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* @param {SunTimes} sunTimes
|
|
1093
|
+
* @param {any} location
|
|
1094
|
+
*/
|
|
1095
|
+
static getCandleLightingFromSunTimes(sunTimes, location) {
|
|
1096
|
+
return sunTimes.sunset && _Zmanim.getCandleLightingFromSunset(sunTimes.sunset, location);
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* @param {Time} sunset
|
|
1100
|
+
* @param {Location} location
|
|
1101
|
+
*/
|
|
1102
|
+
static getCandleLightingFromSunset(sunset, location) {
|
|
1103
|
+
return Utils.addMinutes(sunset, -(location.CandleLighting || 0));
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* @param {Date} date
|
|
1107
|
+
*/
|
|
1108
|
+
static dayOfYear(date) {
|
|
1109
|
+
const month = date.getMonth(), isLeap = () => Utils.isSecularLeapYear(date.getFullYear()), yearDay = [0, 1, 32, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
|
|
1110
|
+
return yearDay[month + 1] + date.getDate() + (month > 1 && isLeap() ? 1 : 0);
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* @param {number} deg
|
|
1114
|
+
* @param {number} min
|
|
1115
|
+
*/
|
|
1116
|
+
static degToDec(deg, min) {
|
|
1117
|
+
return deg + min / 60;
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* @param {number} x
|
|
1121
|
+
*/
|
|
1122
|
+
static M(x) {
|
|
1123
|
+
return 0.9856 * x - 3.251;
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* @param {number} x
|
|
1127
|
+
*/
|
|
1128
|
+
static L(x) {
|
|
1129
|
+
return x + 1.916 * Math.sin(0.01745 * x) + 0.02 * Math.sin(2 * 0.01745 * x) + 282.565;
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* @param {number} x
|
|
1133
|
+
*/
|
|
1134
|
+
static adj(x) {
|
|
1135
|
+
return -0.06571 * x - 6.62;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* @param {number} rad
|
|
1139
|
+
*/
|
|
1140
|
+
static radToDeg(rad) {
|
|
1141
|
+
return 57.29578 * rad;
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* @param {number} time
|
|
1145
|
+
* @param {Date} date
|
|
1146
|
+
* @param {Location} location
|
|
1147
|
+
*/
|
|
1148
|
+
static timeAdj(time, date, location) {
|
|
1149
|
+
if (time < 0) {
|
|
1150
|
+
time += 24;
|
|
1151
|
+
}
|
|
1152
|
+
let hour = Utils.toInt(time);
|
|
1153
|
+
const minFloat = (time - hour) * 60 + 0.5, min = Utils.toInt(minFloat), sec = Math.round(60 * (minFloat - min));
|
|
1154
|
+
if (Utils.isDST(location, date)) {
|
|
1155
|
+
hour++;
|
|
1156
|
+
}
|
|
1157
|
+
return Utils.fixTime({ hour, minute: min, second: sec });
|
|
1158
|
+
}
|
|
1159
|
+
};
|
|
1160
|
+
|
|
1161
|
+
// src/Utils.ts
|
|
1162
|
+
var __DEV__ = process.env.NODE_ENV === "development";
|
|
1163
|
+
var DaysOfWeek = Object.freeze({
|
|
1164
|
+
SUNDAY: 0,
|
|
1165
|
+
MONDAY: 1,
|
|
1166
|
+
TUESDAY: 2,
|
|
1167
|
+
WEDNESDAY: 3,
|
|
1168
|
+
THURSDAY: 4,
|
|
1169
|
+
FRIDAY: 5,
|
|
1170
|
+
SHABBOS: 6
|
|
1171
|
+
});
|
|
1172
|
+
var JewishMonthsNames = Object.freeze({
|
|
1173
|
+
NISSAN: 1,
|
|
1174
|
+
IYAR: 2,
|
|
1175
|
+
SIVAN: 3,
|
|
1176
|
+
TAMUZ: 4,
|
|
1177
|
+
AV: 5,
|
|
1178
|
+
ELLUL: 6,
|
|
1179
|
+
TISHREI: 7,
|
|
1180
|
+
CHESHVAN: 8,
|
|
1181
|
+
KISLEV: 9,
|
|
1182
|
+
TEVES: 10,
|
|
1183
|
+
SHVAT: 11,
|
|
1184
|
+
ADAR: 12,
|
|
1185
|
+
ADAR_SHEINI: 13
|
|
1186
|
+
});
|
|
1187
|
+
var JewishMonthsEng = [
|
|
1188
|
+
"",
|
|
1189
|
+
"Nissan",
|
|
1190
|
+
"Iyar",
|
|
1191
|
+
"Sivan",
|
|
1192
|
+
"Tamuz",
|
|
1193
|
+
"Av",
|
|
1194
|
+
"Ellul",
|
|
1195
|
+
"Tishrei",
|
|
1196
|
+
"Cheshvan",
|
|
1197
|
+
"Kislev",
|
|
1198
|
+
"Teves",
|
|
1199
|
+
"Shvat",
|
|
1200
|
+
"Adar",
|
|
1201
|
+
"Adar Sheini"
|
|
1202
|
+
];
|
|
1203
|
+
var JewishMonthsHeb = [
|
|
1204
|
+
"",
|
|
1205
|
+
"\u05E0\u05D9\u05E1\u05DF",
|
|
1206
|
+
"\u05D0\u05D9\u05D9\u05E8",
|
|
1207
|
+
"\u05E1\u05D9\u05D5\u05DF",
|
|
1208
|
+
"\u05EA\u05DE\u05D5\u05D6",
|
|
1209
|
+
"\u05D0\u05D1",
|
|
1210
|
+
"\u05D0\u05DC\u05D5\u05DC",
|
|
1211
|
+
"\u05EA\u05E9\u05E8\u05D9",
|
|
1212
|
+
"\u05D7\u05E9\u05D5\u05DF",
|
|
1213
|
+
"\u05DB\u05E1\u05DC\u05D5",
|
|
1214
|
+
"\u05D8\u05D1\u05EA",
|
|
1215
|
+
"\u05E9\u05D1\u05D8",
|
|
1216
|
+
"\u05D0\u05D3\u05E8",
|
|
1217
|
+
"\u05D0\u05D3\u05E8 \u05E9\u05E0\u05D9"
|
|
1218
|
+
];
|
|
1219
|
+
var SecularMonthsEng = [
|
|
1220
|
+
"January",
|
|
1221
|
+
"February",
|
|
1222
|
+
"March",
|
|
1223
|
+
"April",
|
|
1224
|
+
"May",
|
|
1225
|
+
"June",
|
|
1226
|
+
"July",
|
|
1227
|
+
"August",
|
|
1228
|
+
"September",
|
|
1229
|
+
"October",
|
|
1230
|
+
"November",
|
|
1231
|
+
"December"
|
|
1232
|
+
];
|
|
1233
|
+
var DaysOfWeekEng = [
|
|
1234
|
+
"Sunday",
|
|
1235
|
+
"Monday",
|
|
1236
|
+
"Tuesday",
|
|
1237
|
+
"Wednesday",
|
|
1238
|
+
"Thursday",
|
|
1239
|
+
"Erev Shabbos",
|
|
1240
|
+
"Shabbos Kodesh"
|
|
1241
|
+
];
|
|
1242
|
+
var DaysOfWeekHeb = [
|
|
1243
|
+
"\u05D9\u05D5\u05DD \u05E8\u05D0\u05E9\u05D5\u05DF",
|
|
1244
|
+
"\u05D9\u05D5\u05DD \u05E9\u05E0\u05D9",
|
|
1245
|
+
"\u05D9\u05D5\u05DD \u05E9\u05DC\u05D9\u05E9\u05D9",
|
|
1246
|
+
"\u05D9\u05D5\u05DD \u05E8\u05D1\u05D9\u05E2\u05D9",
|
|
1247
|
+
"\u05D9\u05D5\u05DD \u05D7\u05DE\u05D9\u05E9\u05D9",
|
|
1248
|
+
"\u05E2\u05E8\u05D1 \u05E9\u05D1\u05EA \u05E7\u05D5\u05D3\u05E9",
|
|
1249
|
+
"\u05E9\u05D1\u05EA \u05E7\u05D5\u05D3\u05E9"
|
|
1250
|
+
];
|
|
1251
|
+
var _Utils = class _Utils {
|
|
1252
|
+
/**
|
|
1253
|
+
* Gets the Jewish representation of a number (365 = שס"ה)
|
|
1254
|
+
* Minimum number is 1 and maximum is 9999.
|
|
1255
|
+
* @param {Number} number
|
|
1256
|
+
*/
|
|
1257
|
+
static toJewishNumber(number) {
|
|
1258
|
+
if (number < 1) {
|
|
1259
|
+
throw "Min value is 1";
|
|
1260
|
+
}
|
|
1261
|
+
if (number > 9999) {
|
|
1262
|
+
throw "Max value is 9999";
|
|
1263
|
+
}
|
|
1264
|
+
let n = number, retval = "";
|
|
1265
|
+
if (n >= 1e3) {
|
|
1266
|
+
retval += _Utils.jsd[_Utils.toInt((n - n % 1e3) / 1e3) - 1] + "'";
|
|
1267
|
+
n = n % 1e3;
|
|
1268
|
+
}
|
|
1269
|
+
while (n >= 400) {
|
|
1270
|
+
retval += "\u05EA";
|
|
1271
|
+
n -= 400;
|
|
1272
|
+
}
|
|
1273
|
+
if (n >= 100) {
|
|
1274
|
+
retval += _Utils.jhd[_Utils.toInt((n - n % 100) / 100) - 1];
|
|
1275
|
+
n = n % 100;
|
|
1276
|
+
}
|
|
1277
|
+
if (n == 15) {
|
|
1278
|
+
retval += "\u05D8\u05D5";
|
|
1279
|
+
} else if (n == 16) {
|
|
1280
|
+
retval += "\u05D8\u05D6";
|
|
1281
|
+
} else {
|
|
1282
|
+
if (n > 9) {
|
|
1283
|
+
retval += _Utils.jtd[_Utils.toInt((n - n % 10) / 10) - 1];
|
|
1284
|
+
}
|
|
1285
|
+
if (n % 10 > 0) {
|
|
1286
|
+
retval += _Utils.jsd[n % 10 - 1];
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
if (number > 999 && number % 1e3 < 10) {
|
|
1290
|
+
retval = "'" + retval;
|
|
1291
|
+
} else if (retval.length > 1) {
|
|
1292
|
+
retval = retval.slice(0, -1) + '"' + retval[retval.length - 1];
|
|
1293
|
+
}
|
|
1294
|
+
return retval;
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Returns the javascript date in the format: Thursday, the 3rd of January 2018.
|
|
1298
|
+
* @param {Date} date
|
|
1299
|
+
* @param {Boolean} hideDayOfWeek
|
|
1300
|
+
* @param {Boolean} dontCapitalize
|
|
1301
|
+
*/
|
|
1302
|
+
static toStringDate(date, hideDayOfWeek, dontCapitalize) {
|
|
1303
|
+
if (!date)
|
|
1304
|
+
return;
|
|
1305
|
+
return (hideDayOfWeek ? dontCapitalize ? "t" : "T" : DaysOfWeekEng[date.getDay()] + ", t") + "he " + _Utils.toSuffixed(date.getDate()) + " of " + SecularMonthsEng[date.getMonth()] + " " + date.getFullYear().toString();
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Returns the javascript date in the format: 1/3/2020.
|
|
1309
|
+
* @param {Date} date
|
|
1310
|
+
* @param {Boolean} monthFirst
|
|
1311
|
+
*/
|
|
1312
|
+
static toShortStringDate(date, monthFirst) {
|
|
1313
|
+
if (!date)
|
|
1314
|
+
return;
|
|
1315
|
+
const dayNum = date.getDate(), monthNum = date.getMonth() + 1;
|
|
1316
|
+
return (monthFirst ? `${monthNum}/${dayNum}` : `${dayNum < 10 ? "0" : ""}${dayNum}/${monthNum < 10 ? "0" : ""}${monthNum}`) + "/" + date.getFullYear().toString();
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Add two character suffix to number. e.g. 21st, 102nd, 93rd, 500th
|
|
1320
|
+
* @param {Number} num
|
|
1321
|
+
*/
|
|
1322
|
+
static toSuffixed(num) {
|
|
1323
|
+
const t = num.toString();
|
|
1324
|
+
let suffix = "th";
|
|
1325
|
+
if (t.length === 1 || t[t.length - 2] !== "1") {
|
|
1326
|
+
switch (t[t.length - 1]) {
|
|
1327
|
+
case "1":
|
|
1328
|
+
suffix = "st";
|
|
1329
|
+
break;
|
|
1330
|
+
case "2":
|
|
1331
|
+
suffix = "nd";
|
|
1332
|
+
break;
|
|
1333
|
+
case "3":
|
|
1334
|
+
suffix = "rd";
|
|
1335
|
+
break;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
return t + suffix;
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* Returns if the given full secular year has a February 29th
|
|
1342
|
+
* @param {Number} year
|
|
1343
|
+
*/
|
|
1344
|
+
static isSecularLeapYear(year) {
|
|
1345
|
+
return !(year % 400) || !!(year % 100) && !(year % 4);
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Get day of week using Javascripts getDay function.
|
|
1349
|
+
* Important note: months starts at 1 not 0 like javascript
|
|
1350
|
+
* The DOW returned has Sunday = 0
|
|
1351
|
+
* @param {Number} year
|
|
1352
|
+
* @param {Number} month
|
|
1353
|
+
* @param {Number} day
|
|
1354
|
+
*/
|
|
1355
|
+
static getSdDOW(year, month, day) {
|
|
1356
|
+
return new Date(year, month - 1, day).getDay();
|
|
1357
|
+
}
|
|
1358
|
+
/**
|
|
1359
|
+
* Makes sure hour is between 0 and 23 and minute is between 0 and 59.
|
|
1360
|
+
* Overlaps get added/subtracted.
|
|
1361
|
+
* The argument needs to be an object in the format {hour : 12, minute : 42, second : 18}
|
|
1362
|
+
* @param {Time} time
|
|
1363
|
+
*/
|
|
1364
|
+
static fixTime(time) {
|
|
1365
|
+
const result = {
|
|
1366
|
+
hour: time.hour,
|
|
1367
|
+
minute: time.minute,
|
|
1368
|
+
second: time.second || 0
|
|
1369
|
+
};
|
|
1370
|
+
while (result.second >= 60) {
|
|
1371
|
+
result.minute += 1;
|
|
1372
|
+
result.second -= 60;
|
|
1373
|
+
}
|
|
1374
|
+
while (result.second < 0) {
|
|
1375
|
+
result.minute -= 1;
|
|
1376
|
+
result.second += 60;
|
|
1377
|
+
}
|
|
1378
|
+
while (result.minute < 0) {
|
|
1379
|
+
result.minute += 60;
|
|
1380
|
+
result.hour--;
|
|
1381
|
+
}
|
|
1382
|
+
while (result.minute >= 60) {
|
|
1383
|
+
result.minute -= 60;
|
|
1384
|
+
result.hour++;
|
|
1385
|
+
}
|
|
1386
|
+
if (result.hour < 0) {
|
|
1387
|
+
result.hour = 24 + result.hour % 24;
|
|
1388
|
+
}
|
|
1389
|
+
if (result.hour > 23) {
|
|
1390
|
+
result.hour = result.hour % 24;
|
|
1391
|
+
}
|
|
1392
|
+
return result;
|
|
1393
|
+
}
|
|
1394
|
+
/**
|
|
1395
|
+
* Add the given number of minutes to the given time.
|
|
1396
|
+
* The argument needs to be an object in the format {hour : 12, minute : 42, second : 18 }
|
|
1397
|
+
*
|
|
1398
|
+
* @param {Time} time
|
|
1399
|
+
* @param {Number} minutes
|
|
1400
|
+
*/
|
|
1401
|
+
static addMinutes(time, minutes) {
|
|
1402
|
+
if (!time)
|
|
1403
|
+
return time;
|
|
1404
|
+
return time && _Utils.fixTime({
|
|
1405
|
+
hour: time.hour,
|
|
1406
|
+
minute: time.minute + (minutes || 0),
|
|
1407
|
+
second: time.second
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* Add the given number of seconds to the given time.
|
|
1412
|
+
* The argument needs to be an object in the format {hour : 12, minute :42, second : 18}
|
|
1413
|
+
*
|
|
1414
|
+
* @param {Time} time
|
|
1415
|
+
* @param {Number} seconds
|
|
1416
|
+
*/
|
|
1417
|
+
static addSeconds(time, seconds) {
|
|
1418
|
+
return _Utils.fixTime({
|
|
1419
|
+
hour: time.hour,
|
|
1420
|
+
minute: time.minute,
|
|
1421
|
+
second: (time.second || 0) + seconds
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* Gets the time difference between two times of day.
|
|
1426
|
+
* If showNegative is falsey, assumes that the earlier time is always before the later time.
|
|
1427
|
+
* So, if laterTime is less than earlierTime, the returned diff is until the next day.
|
|
1428
|
+
* Both arguments need to be an object in the format {hour : 12, minute : 42, second : 18 }
|
|
1429
|
+
* @param {Time} earlierTime
|
|
1430
|
+
* @param {Time} laterTime
|
|
1431
|
+
* @param {Boolean} [showNegative] show negative values or assume second value is next day?
|
|
1432
|
+
* @returns{{hour:number, minute:number, second:number, sign:1|-1}}
|
|
1433
|
+
*/
|
|
1434
|
+
static timeDiff(earlierTime, laterTime, showNegative = false) {
|
|
1435
|
+
const earlySec = _Utils.totalSeconds(earlierTime), laterSec = _Utils.totalSeconds(laterTime), time = _Utils.fixTime({
|
|
1436
|
+
hour: 0,
|
|
1437
|
+
minute: 0,
|
|
1438
|
+
second: earlySec <= laterSec ? laterSec - earlySec : showNegative ? earlySec - laterSec : 86400 - earlySec + laterSec
|
|
1439
|
+
});
|
|
1440
|
+
return {
|
|
1441
|
+
...time,
|
|
1442
|
+
sign: earlySec <= laterSec || !showNegative ? 1 : -1
|
|
1443
|
+
};
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* Gets the total number of minutes in the given time.
|
|
1447
|
+
* @param {Time} time An object in the format {hour : 12, minute :42, second : 18}
|
|
1448
|
+
*/
|
|
1449
|
+
static totalMinutes(time) {
|
|
1450
|
+
return time ? time.hour * 60 + time.minute : 0;
|
|
1451
|
+
}
|
|
1452
|
+
/**
|
|
1453
|
+
* Gets the total number of seconds in the given time.
|
|
1454
|
+
* @param {Time} time An object in the format {hour : 12, minute :42, second : 18}
|
|
1455
|
+
*/
|
|
1456
|
+
static totalSeconds(time) {
|
|
1457
|
+
return time ? _Utils.totalMinutes(time) * 60 + (time.second || 0) : 0;
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* Returns the time of the given javascript date as an object in the format of {hour : 23, minute :42, second: 18 }
|
|
1461
|
+
* @param {Date} sdate
|
|
1462
|
+
* @returns {{hour :number, minute :number, second:number }}
|
|
1463
|
+
*/
|
|
1464
|
+
static timeFromDate(sdate) {
|
|
1465
|
+
return {
|
|
1466
|
+
hour: sdate.getHours(),
|
|
1467
|
+
minute: sdate.getMinutes(),
|
|
1468
|
+
second: sdate.getSeconds()
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* Determines if the second given time is after (or at) the first given time
|
|
1473
|
+
* @param {{hour :number, minute :number, second:number }} beforeTime
|
|
1474
|
+
* @param {{hour :number, minute :number, second:number }} afterTime
|
|
1475
|
+
*/
|
|
1476
|
+
static isTimeAfter(beforeTime, afterTime) {
|
|
1477
|
+
if (!beforeTime || !afterTime)
|
|
1478
|
+
return false;
|
|
1479
|
+
return _Utils.totalSeconds(afterTime) >= _Utils.totalSeconds(beforeTime);
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* Returns the given time interval in a formatted string.
|
|
1483
|
+
* @param {{hour:number, minute:number,second:number,sign?: 1 | -1}} time An object in the format {hour : 23, minute :42, second: 18 }
|
|
1484
|
+
*/
|
|
1485
|
+
static getTimeIntervalTextStringHeb(time) {
|
|
1486
|
+
let t = "";
|
|
1487
|
+
if (time.hour > 0) {
|
|
1488
|
+
t += `${time.hour.toString()} ${time.hour === 1 ? "\u05E9\u05E2\u05D4" : "\u05E9\u05E2\u05D5\u05EA"}`;
|
|
1489
|
+
}
|
|
1490
|
+
if (time.minute > 0) {
|
|
1491
|
+
if (t.length) {
|
|
1492
|
+
t += " ";
|
|
1493
|
+
}
|
|
1494
|
+
t += `${time.minute.toString()} ${time.minute === 1 ? "\u05D3\u05E7\u05D4" : "\u05D3\u05E7\u05D5\u05EA"}`;
|
|
1495
|
+
}
|
|
1496
|
+
if ((time.second || 0) > 0) {
|
|
1497
|
+
if (t.length) {
|
|
1498
|
+
t += " ";
|
|
1499
|
+
}
|
|
1500
|
+
t += `${Math.trunc(time.second || 0).toString()} ${time.second === 1 ? "\u05E9\u05E0\u05D9\u05D9\u05D4" : "\u05E9\u05E0\u05D9\u05D5\u05EA"}`;
|
|
1501
|
+
}
|
|
1502
|
+
return t;
|
|
1503
|
+
}
|
|
1504
|
+
/**
|
|
1505
|
+
* Returns the given time interval in a formatted string.
|
|
1506
|
+
* @param {{hour:number, minute:number,second:number,sign?: 1 | -1}} time An object in the format {hour : 23, minute :42, second: 18 }
|
|
1507
|
+
*/
|
|
1508
|
+
static getTimeIntervalTextString(time) {
|
|
1509
|
+
let t = "";
|
|
1510
|
+
if (time.hour > 0) {
|
|
1511
|
+
t += `${time.hour.toString()} ${time.hour === 1 ? "hour" : "hours"}`;
|
|
1512
|
+
}
|
|
1513
|
+
if (time.minute > 0) {
|
|
1514
|
+
if (t.length) {
|
|
1515
|
+
t += " ";
|
|
1516
|
+
}
|
|
1517
|
+
t += `${time.minute.toString()} ${time.minute === 1 ? "minute" : "minutes"}`;
|
|
1518
|
+
}
|
|
1519
|
+
if ((time.second || 0) > 0) {
|
|
1520
|
+
if (t.length) {
|
|
1521
|
+
t += " ";
|
|
1522
|
+
}
|
|
1523
|
+
t += `${Math.trunc(time.second || 0).toString()} ${time.second === 1 ? "second" : "seconds"}`;
|
|
1524
|
+
}
|
|
1525
|
+
return t;
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Returns the nusach for Sefiras Ha'omer for the given day and minhag
|
|
1529
|
+
* @param {number} dayOfOmer The day of the Omer for which to get the nusach for
|
|
1530
|
+
* @param {'ashkenaz'|'sefard'|'sefardi'} nusach Should it be La'Omer ("sefard") or Ba'Omer ("ashkenaz") or "sefardi" (Eidot Hamizrach)?
|
|
1531
|
+
*/
|
|
1532
|
+
static getOmerNusach(dayOfOmer, nusach) {
|
|
1533
|
+
const weeks = _Utils.toInt(dayOfOmer / 7), days = dayOfOmer % 7;
|
|
1534
|
+
let txt = "\u05D4\u05D9\u05D5\u05DD ";
|
|
1535
|
+
if (dayOfOmer === 1) {
|
|
1536
|
+
txt += "\u05D9\u05D5\u05DD \u05D0\u05D7\u05D3 ";
|
|
1537
|
+
} else {
|
|
1538
|
+
if (dayOfOmer === 2) {
|
|
1539
|
+
txt += "\u05E9\u05E0\u05D9 ";
|
|
1540
|
+
} else {
|
|
1541
|
+
if (dayOfOmer === 10) {
|
|
1542
|
+
txt += "\u05E2\u05E9\u05E8\u05D4 ";
|
|
1543
|
+
} else {
|
|
1544
|
+
txt += _Utils.jsnum[_Utils.toInt(dayOfOmer % 10)] + " ";
|
|
1545
|
+
if (dayOfOmer > 10) {
|
|
1546
|
+
if (dayOfOmer > 20 && dayOfOmer % 10 > 0) {
|
|
1547
|
+
txt += "\u05D5";
|
|
1548
|
+
}
|
|
1549
|
+
txt += _Utils.jtnum[_Utils.toInt(dayOfOmer / 10)] + " ";
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
txt += (dayOfOmer >= 11 ? "\u05D9\u05D5\u05DD" : "\u05D9\u05DE\u05D9\u05DD") + " ";
|
|
1554
|
+
if (nusach === "sefardi") {
|
|
1555
|
+
txt += "\u05DC\u05E2\u05D5\u05DE\u05E8 ";
|
|
1556
|
+
}
|
|
1557
|
+
if (dayOfOmer >= 7) {
|
|
1558
|
+
txt += "\u05E9\u05D4\u05DD ";
|
|
1559
|
+
if (weeks === 1) {
|
|
1560
|
+
txt += "\u05E9\u05D1\u05D5\u05E2 \u05D0\u05D7\u05D3 ";
|
|
1561
|
+
} else if (weeks === 2) {
|
|
1562
|
+
txt += "\u05E9\u05E0\u05D9 \u05E9\u05D1\u05D5\u05E2\u05D5\u05EA ";
|
|
1563
|
+
} else if (weeks > 0) {
|
|
1564
|
+
txt += _Utils.jsnum[_Utils.toInt(weeks)] + " \u05E9\u05D1\u05D5\u05E2\u05D5\u05EA ";
|
|
1565
|
+
}
|
|
1566
|
+
if (days === 1) {
|
|
1567
|
+
txt += "\u05D5\u05D9\u05D5\u05DD \u05D0\u05D7\u05D3 ";
|
|
1568
|
+
} else if (days === 2) {
|
|
1569
|
+
txt += "\u05D5\u05E9\u05E0\u05D9 \u05D9\u05DE\u05D9\u05DD ";
|
|
1570
|
+
} else if (days > 0) {
|
|
1571
|
+
txt += "\u05D5" + _Utils.jsnum[days] + " \u05D9\u05DE\u05D9\u05DD ";
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
if (nusach === "sefard") {
|
|
1576
|
+
txt += "\u05DC\u05E2\u05D5\u05DE\u05E8";
|
|
1577
|
+
} else if (nusach === "ashkenaz") {
|
|
1578
|
+
txt += "\u05D1\u05E2\u05D5\u05DE\u05E8";
|
|
1579
|
+
}
|
|
1580
|
+
return txt;
|
|
1581
|
+
}
|
|
1582
|
+
/**
|
|
1583
|
+
* Returns the given time in a formatted string.
|
|
1584
|
+
* @param {Time} time An object in the format {hour : 23, minute :42, second: 18 }
|
|
1585
|
+
* @param {1 | -1} [sign]
|
|
1586
|
+
* @param {Boolean} [army] If falsey, the returned string will be: 11:42:18 PM otherwise it will be 23:42:18
|
|
1587
|
+
* @param {Boolean} [roundUp] If falsey, the numbers will converted to a whole number by rounding down, otherwise, up.
|
|
1588
|
+
*/
|
|
1589
|
+
static getTimeString(time, sign, army, roundUp) {
|
|
1590
|
+
const round = roundUp ? Math.ceil : Math.floor;
|
|
1591
|
+
time = {
|
|
1592
|
+
hour: round(time.hour),
|
|
1593
|
+
minute: round(time.minute),
|
|
1594
|
+
second: round(time.second || 0)
|
|
1595
|
+
};
|
|
1596
|
+
if (army) {
|
|
1597
|
+
return (sign && sign < 0 ? "-" : "") + (time.hour.toString() + ":" + (time.minute < 10 ? "0" + time.minute.toString() : time.minute.toString()) + ":" + ((time.second || 0) < 10 ? "0" + (time.second || 0).toString() : (time.second || 0).toString()));
|
|
1598
|
+
} else {
|
|
1599
|
+
return (sign && sign < 0 ? "-" : "") + (time.hour <= 12 ? time.hour == 0 ? 12 : time.hour : time.hour - 12).toString() + ":" + (time.minute < 10 ? "0" + time.minute.toString() : time.minute.toString()) + ":" + ((time.second || 0) < 10 ? "0" + (time.second || 0).toString() : (time.second || 0).toString()) + (time.hour < 12 ? " AM" : " PM");
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Gets the UTC offset in whole hours for the users time zone.
|
|
1604
|
+
* Note: this is not affected by DST - unlike javascripts getTimezoneOffset() function which gives you the current offset.
|
|
1605
|
+
*/
|
|
1606
|
+
static currUtcOffset() {
|
|
1607
|
+
const date = /* @__PURE__ */ new Date(), jan = new Date(date.getFullYear(), 0, 1), jul = new Date(date.getFullYear(), 6, 1);
|
|
1608
|
+
return -_Utils.toInt(
|
|
1609
|
+
Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()) / 60
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
/** Determines if the given date is within DST on the users system */
|
|
1613
|
+
static isDateDST(date) {
|
|
1614
|
+
return -_Utils.toInt(date.getTimezoneOffset() / 60) !== _Utils.currUtcOffset();
|
|
1615
|
+
}
|
|
1616
|
+
/**
|
|
1617
|
+
* Determines if the given date is within DST in the given location
|
|
1618
|
+
* Note: This may not be correct if the user has set the Location to a
|
|
1619
|
+
* time zone outside Israel or the USA which is not the current system time zone.
|
|
1620
|
+
*/
|
|
1621
|
+
static isDST(location, date) {
|
|
1622
|
+
if (location.UTCOffset === _Utils.currUtcOffset()) {
|
|
1623
|
+
return _Utils.isDateDST(date);
|
|
1624
|
+
} else if (location.Israel) {
|
|
1625
|
+
return _Utils.isIsrael_DST(date);
|
|
1626
|
+
} else {
|
|
1627
|
+
return _Utils.isUSA_DST(date);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Determines if the given javascript date is during DST according to the USA rules
|
|
1632
|
+
* @param {Date} date A javascript Date object
|
|
1633
|
+
*/
|
|
1634
|
+
static isUSA_DST(date) {
|
|
1635
|
+
const year = date.getFullYear(), month = date.getMonth() + 1, day = date.getDate(), hour = date.getHours();
|
|
1636
|
+
if (month < 3 || month == 12) {
|
|
1637
|
+
return false;
|
|
1638
|
+
} else if (month > 3 && month < 11) {
|
|
1639
|
+
return true;
|
|
1640
|
+
} else if (month === 3) {
|
|
1641
|
+
const firstDOW = _Utils.getSdDOW(year, 3, 1), targetDate = firstDOW == 0 ? 8 : 7 - (firstDOW + 7) % 7 + 8;
|
|
1642
|
+
return day > targetDate || day === targetDate && hour >= 2;
|
|
1643
|
+
} else {
|
|
1644
|
+
const firstDOW = _Utils.getSdDOW(year, 11, 1), targetDate = firstDOW === 0 ? 1 : 7 - (firstDOW + 7) % 7 + 1;
|
|
1645
|
+
return day < targetDate || day === targetDate && hour < 2;
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
//
|
|
1649
|
+
/**
|
|
1650
|
+
* Determines if the given Javascript date is during DST according to the current (5776) Israeli rules
|
|
1651
|
+
* @param {Date} date A Javascript Date object
|
|
1652
|
+
*/
|
|
1653
|
+
static isIsrael_DST(date) {
|
|
1654
|
+
const year = date.getFullYear(), month = date.getMonth() + 1, day = date.getDate(), hour = date.getHours();
|
|
1655
|
+
if (month > 10 || month < 3) {
|
|
1656
|
+
return false;
|
|
1657
|
+
} else if (month > 3 && month < 10) {
|
|
1658
|
+
return true;
|
|
1659
|
+
} else if (month === 3) {
|
|
1660
|
+
const lastFriday = 31 - _Utils.getSdDOW(year, 3, 31) - 2;
|
|
1661
|
+
return day > lastFriday || day === lastFriday && hour >= 2;
|
|
1662
|
+
} else {
|
|
1663
|
+
const lastSunday = 31 - _Utils.getSdDOW(year, 10, 31);
|
|
1664
|
+
return day < lastSunday || day === lastSunday && hour < 2;
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
/** The current time in Israel - determined by the current users system time and time zone offset*/
|
|
1668
|
+
static getSdNowInIsrael() {
|
|
1669
|
+
const now = /* @__PURE__ */ new Date(), israelTimeOffset = 2 + -_Utils.currUtcOffset();
|
|
1670
|
+
now.setHours(now.getHours() + israelTimeOffset);
|
|
1671
|
+
return now;
|
|
1672
|
+
}
|
|
1673
|
+
/**
|
|
1674
|
+
* Adds the given number of days to the given javascript date and returns the new date
|
|
1675
|
+
* @param {Date} sdate
|
|
1676
|
+
* @param {Number} days
|
|
1677
|
+
*/
|
|
1678
|
+
static addDaysToSdate(sdate, days) {
|
|
1679
|
+
return new Date(sdate.valueOf() + 864e5 * days);
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Compares two js dates to se if they both refer to the same day - time is ignored.
|
|
1683
|
+
* @param {Date} sdate1
|
|
1684
|
+
* @param {Date} sdate2
|
|
1685
|
+
*/
|
|
1686
|
+
static isSameSdate(sdate1, sdate2) {
|
|
1687
|
+
return sdate1 && sdate2 && sdate1.toDateString() === sdate2.toDateString();
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* Compares two jDates to se if they both refer to the same day - time is ignored.
|
|
1691
|
+
* @param {jDate} jdate1
|
|
1692
|
+
* @param {jDate} jdate2
|
|
1693
|
+
*/
|
|
1694
|
+
static isSameJdate(jdate1, jdate2) {
|
|
1695
|
+
return jdate1 && jdate2 && jdate1.Abs && jdate2.Abs && jdate1.Abs === jdate2.Abs;
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
* Compares two jDates to see if they both refer to the same Jewish Month.
|
|
1699
|
+
* @param {jDate} jdate1
|
|
1700
|
+
* @param {jDate} jdate2
|
|
1701
|
+
*/
|
|
1702
|
+
static isSameJMonth(jdate1, jdate2) {
|
|
1703
|
+
return jdate1.Month === jdate2.Month && jdate1.Year === jdate2.Year;
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Compares two dates to se if they both refer to the same Secular Month.
|
|
1707
|
+
* @param {Date} sdate1
|
|
1708
|
+
* @param {Date} sdate2
|
|
1709
|
+
*/
|
|
1710
|
+
static isSameSMonth(sdate1, sdate2) {
|
|
1711
|
+
return sdate1.getMonth() === sdate2.getMonth() && sdate1.getFullYear() === sdate2.getFullYear();
|
|
1712
|
+
}
|
|
1713
|
+
/**
|
|
1714
|
+
* Determines if the time of the given Date() is after sunset at the given Location
|
|
1715
|
+
* @param {Date} sdate
|
|
1716
|
+
* @param {Location} location
|
|
1717
|
+
*/
|
|
1718
|
+
static isAfterSunset(sdate, location) {
|
|
1719
|
+
const shkia = Zmanim.getSunTimes(sdate, location).sunset, now = _Utils.timeFromDate(sdate);
|
|
1720
|
+
return shkia && _Utils.isTimeAfter(shkia, now);
|
|
1721
|
+
}
|
|
1722
|
+
/**
|
|
1723
|
+
* Gets the current Jewish Date at the given Location
|
|
1724
|
+
* @param {Location} location
|
|
1725
|
+
*/
|
|
1726
|
+
static nowAtLocation(location) {
|
|
1727
|
+
let sdate = /* @__PURE__ */ new Date();
|
|
1728
|
+
if (_Utils.isAfterSunset(sdate, location)) {
|
|
1729
|
+
sdate.setDate(sdate.getDate() + 1);
|
|
1730
|
+
}
|
|
1731
|
+
return new jDate(sdate);
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Converts the given complex number to an integer by removing the decimal part.
|
|
1735
|
+
* Returns same results as Math.floor for positive numbers and Math.ceil for negative ones.
|
|
1736
|
+
* Almost identical functionality to Math.trunc and parseInt.
|
|
1737
|
+
* The difference is if the argument is NaN. Math.trunc returns NaN while ths fuction returns 0.
|
|
1738
|
+
* In performance tests, this function was found to be quicker than the alternatives.
|
|
1739
|
+
* @param {Number} float The complex number to convert to an integer
|
|
1740
|
+
*/
|
|
1741
|
+
static toInt(float) {
|
|
1742
|
+
return float | 0;
|
|
1743
|
+
}
|
|
1744
|
+
/***
|
|
1745
|
+
* Takes either a jDate or a Date and returns both
|
|
1746
|
+
* @param date {Date |jDate}
|
|
1747
|
+
* @returns {{ sdate:Date, jdate:jDate }}
|
|
1748
|
+
*/
|
|
1749
|
+
static bothDates(date) {
|
|
1750
|
+
const jdate = date instanceof Date ? new jDate(date) : date;
|
|
1751
|
+
const sdate = date instanceof Date ? date : jdate.getDate();
|
|
1752
|
+
return { sdate, jdate };
|
|
1753
|
+
}
|
|
1754
|
+
/** Returns true if "thing" is either a string primitive or String object.*/
|
|
1755
|
+
static isString(thing) {
|
|
1756
|
+
return typeof thing === "string" || thing instanceof String;
|
|
1757
|
+
}
|
|
1758
|
+
/** Returns true if "thing" is either a number primitive or a Number object.*/
|
|
1759
|
+
static isNumber(thing) {
|
|
1760
|
+
return typeof thing === "number" || thing instanceof Number;
|
|
1761
|
+
}
|
|
1762
|
+
/** Returns true if "thing" is a Date object containing a valid date.*/
|
|
1763
|
+
static isValidDate(thing) {
|
|
1764
|
+
return thing instanceof Date && !isNaN(thing.valueOf());
|
|
1765
|
+
}
|
|
1766
|
+
/** Returns whether or not the given, array, string, or argument list contains the given item or substring.
|
|
1767
|
+
*
|
|
1768
|
+
* This function is awfully similar to Array.includes, but has the added plus of accepting any number or type of arguments.*/
|
|
1769
|
+
static has(o, ...arr) {
|
|
1770
|
+
if (arr.length === 1 && (Array.isArray(arr[0]) || _Utils.isString(arr[0]))) {
|
|
1771
|
+
return arr[0].includes(o);
|
|
1772
|
+
} else {
|
|
1773
|
+
return arr.includes(o);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
/** Returns the first value unless it is undefined, null or NaN.
|
|
1777
|
+
*
|
|
1778
|
+
* This is very useful for boolean, string and integer parameters
|
|
1779
|
+
* where we want to keep false, "" and 0 if they were supplied.
|
|
1780
|
+
*
|
|
1781
|
+
* Similar purpose to default parameters with the difference being that this function will return
|
|
1782
|
+
* the second value if the first is NaN or null, while default params will give give you the NaN or the null.
|
|
1783
|
+
*/
|
|
1784
|
+
static setDefault(paramValue, defValue) {
|
|
1785
|
+
if (typeof paramValue === "undefined" || paramValue === null || isNaN(paramValue)) {
|
|
1786
|
+
return defValue;
|
|
1787
|
+
} else {
|
|
1788
|
+
return paramValue;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
/**
|
|
1792
|
+
* Returns an array containing a range of integers.
|
|
1793
|
+
* @param {Number} [start] The number to start at. The start number is included in the results.
|
|
1794
|
+
* If only one argument is supplied, start will be set to 1.
|
|
1795
|
+
* @param {Number} end The top end of the range.
|
|
1796
|
+
* Unlike Pythons range function, The end number is included in the results.
|
|
1797
|
+
* @returns {[Number]}
|
|
1798
|
+
*/
|
|
1799
|
+
static range(start, end) {
|
|
1800
|
+
const startNumber = typeof end === "undefined" ? 1 : start, endNumber = typeof end === "undefined" ? start : end;
|
|
1801
|
+
return Array.from({ length: endNumber - startNumber + 1 }, (v, i) => startNumber + i);
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* Log message to console
|
|
1805
|
+
* @param {string} txt
|
|
1806
|
+
*/
|
|
1807
|
+
static log(txt, ...optionalItems) {
|
|
1808
|
+
if (__DEV__) {
|
|
1809
|
+
console.log(txt, ...optionalItems);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
/**
|
|
1813
|
+
* Warn message to console
|
|
1814
|
+
* @param {string} txt
|
|
1815
|
+
*/
|
|
1816
|
+
static warn(txt, ...optionalItems) {
|
|
1817
|
+
if (__DEV__) {
|
|
1818
|
+
console.warn(txt, ...optionalItems);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1822
|
+
* Error message to console
|
|
1823
|
+
* @param {*} txt
|
|
1824
|
+
*/
|
|
1825
|
+
static error(txt, ...optionalItems) {
|
|
1826
|
+
if (__DEV__) {
|
|
1827
|
+
console.error(txt, ...optionalItems);
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
};
|
|
1831
|
+
_Utils.jsd = ["\u05D0", "\u05D1", "\u05D2", "\u05D3", "\u05D4", "\u05D5", "\u05D6", "\u05D7", "\u05D8"];
|
|
1832
|
+
_Utils.jtd = ["\u05D9", "\u05DB", "\u05DC", "\u05DE", "\u05E0", "\u05E1", "\u05E2", "\u05E4", "\u05E6"];
|
|
1833
|
+
_Utils.jhd = ["\u05E7", "\u05E8", "\u05E9", "\u05EA"];
|
|
1834
|
+
_Utils.jsnum = [
|
|
1835
|
+
"",
|
|
1836
|
+
"\u05D0\u05D7\u05D3",
|
|
1837
|
+
"\u05E9\u05E0\u05D9\u05DD",
|
|
1838
|
+
"\u05E9\u05DC\u05E9\u05D4",
|
|
1839
|
+
"\u05D0\u05E8\u05D1\u05E2\u05D4",
|
|
1840
|
+
"\u05D7\u05DE\u05E9\u05D4",
|
|
1841
|
+
"\u05E9\u05E9\u05D4",
|
|
1842
|
+
"\u05E9\u05D1\u05E2\u05D4",
|
|
1843
|
+
"\u05E9\u05DE\u05D5\u05E0\u05D4",
|
|
1844
|
+
"\u05EA\u05E9\u05E2\u05D4"
|
|
1845
|
+
];
|
|
1846
|
+
_Utils.jtnum = ["", "\u05E2\u05E9\u05E8", "\u05E2\u05E9\u05E8\u05D9\u05DD", "\u05E9\u05DC\u05D5\u05E9\u05D9\u05DD", "\u05D0\u05E8\u05D1\u05E2\u05D9\u05DD"];
|
|
1847
|
+
var Utils = _Utils;
|
|
1848
|
+
|
|
1849
|
+
// src/JCal/Location.ts
|
|
1850
|
+
var Location = class _Location {
|
|
1851
|
+
/**
|
|
1852
|
+
* Describe a new Location.
|
|
1853
|
+
* @param {String} name The name of the Location
|
|
1854
|
+
* @param {String} nameHeb The name of the Location
|
|
1855
|
+
* @param {Boolean} israel Is this Location in Israel?
|
|
1856
|
+
* @param {Number} latitude
|
|
1857
|
+
* @param {Number} longitude
|
|
1858
|
+
* @param {Number} utcOffset The time zone. Israel is 2 and New York is -5.
|
|
1859
|
+
* @param {Number} elevation Elevation in meters
|
|
1860
|
+
* @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
|
|
1861
|
+
*/
|
|
1862
|
+
constructor(name, nameHeb, israel2, latitude, longitude, utcOffset, elevation, candleLighting) {
|
|
1863
|
+
if (typeof israel2 === "undefined" || israel2 === null) {
|
|
1864
|
+
israel2 = latitude > 29.45 && latitude < 33 && longitude < -34.23 && longitude > -35.9;
|
|
1865
|
+
}
|
|
1866
|
+
if (israel2) {
|
|
1867
|
+
utcOffset = 2;
|
|
1868
|
+
} else if (typeof utcOffset === "undefined" || utcOffset === null) {
|
|
1869
|
+
utcOffset = -Math.round(longitude / 15);
|
|
1870
|
+
}
|
|
1871
|
+
this.Name = name || "Unknown Location";
|
|
1872
|
+
this.NameHebrew = nameHeb;
|
|
1873
|
+
this.Israel = !!israel2;
|
|
1874
|
+
this.Latitude = latitude;
|
|
1875
|
+
this.Longitude = longitude;
|
|
1876
|
+
this.UTCOffset = utcOffset || 0;
|
|
1877
|
+
this.Elevation = elevation || 0;
|
|
1878
|
+
this.CandleLighting = candleLighting || _Location.getCandles(this);
|
|
1879
|
+
}
|
|
1880
|
+
static clone(location) {
|
|
1881
|
+
return new _Location(
|
|
1882
|
+
location.Name,
|
|
1883
|
+
location.NameHebrew,
|
|
1884
|
+
location.Israel,
|
|
1885
|
+
location.Latitude,
|
|
1886
|
+
location.Longitude,
|
|
1887
|
+
location.UTCOffset,
|
|
1888
|
+
location.Elevation,
|
|
1889
|
+
location.CandleLighting || 0
|
|
1890
|
+
);
|
|
1891
|
+
}
|
|
1892
|
+
static getCandles(location) {
|
|
1893
|
+
if (location.CandleLighting) {
|
|
1894
|
+
return location.CandleLighting;
|
|
1895
|
+
} else if (!location.Israel) {
|
|
1896
|
+
return 18;
|
|
1897
|
+
} else {
|
|
1898
|
+
const special = [
|
|
1899
|
+
{ names: ["jerusalem", "yerush", "petach", "petah", "petak", "beit shemesh", "\u05D9\u05E8\u05D5\u05E9\u05DC\u05D9\u05DD", "\u05E4\u05EA\u05D7 \u05EA\u05E7\u05D5\u05D4", "\u05D1\u05D9\u05EA \u05E9\u05DE\u05E9"], min: 40 },
|
|
1900
|
+
{ names: ["haifa", "chaifa", "be'er sheva", "beersheba", "\u05D7\u05D9\u05E4\u05D4", "\u05D1\u05D0\u05E8 \u05E9\u05D1\u05E2"], min: 22 }
|
|
1901
|
+
], loclc = location.Name.toLowerCase(), city = special.find((sp) => {
|
|
1902
|
+
return sp.names.find((spi) => {
|
|
1903
|
+
return loclc.indexOf(spi) > -1;
|
|
1904
|
+
});
|
|
1905
|
+
});
|
|
1906
|
+
return city ? city.min : 30;
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
/**Gets the Location for Jerusalem.*/
|
|
1910
|
+
static getJerusalem() {
|
|
1911
|
+
return new _Location("Jerusalem", "\u05D9\u05E8\u05D5\u05E9\u05DC\u05D9\u05DD", true, 31.78, -35.22, 2, 800, 40);
|
|
1912
|
+
}
|
|
1913
|
+
/**Gets the Location for Lakewood NJ*/
|
|
1914
|
+
static getLakewood() {
|
|
1915
|
+
return new _Location("Lakewood NJ", void 0, false, 40.1, 74.23, -5, 0, 18);
|
|
1916
|
+
}
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
// src/Locations.ts
|
|
1920
|
+
import { distance } from "closest-match";
|
|
1921
|
+
|
|
1922
|
+
// src/locations.json
|
|
1923
|
+
var locations_default = [{ name: "Ofakim", heb: "\u05D0\u05D5\u05E4\u05E7\u05D9\u05DD", il: true, tz: 2, el: 170, lat: 31.32, lon: -34.62 }, { name: "Eilat", heb: "\u05D0\u05D9\u05DC\u05EA", il: true, tz: 2, lat: 29.55, lon: -34.95 }, { name: "Elad", heb: "\u05D0\u05DC\u05E2\u05D3", il: true, tz: 2, el: 150, lat: 32.05, lon: -34.95 }, { name: "Ashdod", heb: "\u05D0\u05E9\u05D3\u05D5\u05D3", il: true, tz: 2, lat: 31.78, lon: -34.63 }, { name: "Ashkelon", heb: "\u05D0\u05E9\u05E7\u05DC\u05D5\u05DF", il: true, tz: 2, lat: 31.65, lon: -34.57 }, { name: "Be'er Ya'akov", heb: "\u05D1\u05D0\u05E8 \u05D9\u05E2\u05E7\u05D1", il: true, tz: 2, lat: 31.93, lon: -34.83 }, { name: "Bersheba", heb: "\u05D1\u05D0\u05E8 \u05E9\u05D1\u05E2", il: true, tz: 2, el: 270, lat: 31.23, lon: -34.78 }, { name: "Beit She'an", heb: "\u05D1\u05D9\u05EA \u05E9\u05D0\u05DF", il: true, tz: 2, el: 0, lat: 32.5, lon: -35.5 }, { name: "Beit Shemesh", heb: "\u05D1\u05D9\u05EA \u05E9\u05DE\u05E9", il: true, tz: 2, el: 300, lat: 31.73, lon: -34.98 }, { name: "Beitar Illit", heb: "\u05D1\u05D9\u05EA\u05E8 \u05E2\u05DC\u05D9\u05EA", il: true, tz: 2, el: 800, lat: 31.68, lon: -35.12 }, { name: "Bnei Brak", heb: "\u05D1\u05E0\u05D9 \u05D1\u05E8\u05E7", il: true, tz: 2, el: 70, lat: 32.08, lon: -34.82, cl: 21 }, { name: "Binyamina", heb: "\u05D1\u05E0\u05D9\u05DE\u05D9\u05E0\u05D4", il: true, tz: 2, lat: 32.52, lon: -34.95 }, { name: "Bat Yam", heb: "\u05D1\u05EA \u05D9\u05DD", il: true, tz: 2, lat: 32.02, lon: -34.73 }, { name: "Givat Zeev", heb: "\u05D2\u05D1\u05E2\u05EA \u05D6\u05D0\u05D1", il: true, tz: 2, lat: 31.87, lon: -35.17 }, { name: "Givatayim", heb: "\u05D2\u05D1\u05EA\u05D9\u05D9\u05DD", il: true, tz: 2, lat: 32.05, lon: -34.8 }, { name: "Dimona", heb: "\u05D3\u05D9\u05DE\u05D5\u05E0\u05D4", il: true, tz: 2, lat: 31.07, lon: -35.03 }, { name: "Hertzeliya", heb: "\u05D4\u05E8\u05E6\u05DC\u05D9\u05D4", il: true, tz: 2, lat: 32.17, lon: -34.83 }, { name: "Zichron Ya'akov", heb: "\u05D6\u05DB\u05E8\u05D5\u05DF \u05D9\u05E2\u05E7\u05D1", il: true, tz: 2, el: 170, lat: 32.57, lon: -34.95 }, { name: "Hebron", heb: "\u05D7\u05D1\u05E8\u05D5\u05DF", il: true, tz: 2, el: 950, lat: 31.53, lon: -35.08 }, { name: "Hadera", heb: "\u05D7\u05D3\u05E8\u05D4", il: true, tz: 2, lat: 32.43, lon: -34.92 }, { name: "Holon", heb: "\u05D7\u05D5\u05DC\u05D5\u05DF", il: true, tz: 2, lat: 32.02, lon: -34.75 }, { name: "Chispin", heb: "\u05D7\u05D9\u05E1\u05E4\u05D9\u05DF", il: true, tz: 2, lat: 32.85, lon: -35.77 }, { name: "Haifa", heb: "\u05D7\u05D9\u05E4\u05D4", il: true, tz: 2, el: 370, lat: 32.8, lon: -34.98 }, { name: "Chafetz Chaim", heb: "\u05D7\u05E4\u05E5 \u05D7\u05D9\u05D9\u05DD", il: true, tz: 2, el: 80, lat: 31.48, lon: -34.47 }, { name: "Tiberius", heb: "\u05D8\u05D1\u05E8\u05D9\u05D4", il: true, tz: 2, lat: 32.78, lon: -35.53 }, { name: "Telz Stone", heb: "\u05D8\u05DC\u05D6 \u05E1\u05D8\u05D5\u05DF", il: true, tz: 2, el: 720, lat: 31.78, lon: -35.1 }, { name: "Yerucham", heb: "\u05D9\u05E8\u05D5\u05D7\u05DD", il: true, tz: 2, lat: 30.98, lon: -34.92 }, { name: "Jerusalem", heb: "\u05D9\u05E8\u05D5\u05E9\u05DC\u05D9\u05DD", il: true, tz: 2, el: 775, lat: 31.77, lon: -35.23, cl: 40 }, { name: "Kfar Chabad", heb: "\u05DB\u05E4\u05E8 \u05D7\u05D1\u05D3", il: true, tz: 2, lat: 31.97, lon: -34.8 }, { name: "Kfar Chasidim", heb: "\u05DB\u05E4\u05E8 \u05D7\u05E1\u05D9\u05D3\u05D9\u05DD", il: true, tz: 2, el: 154, lat: 32.73, lon: -35.08 }, { name: "Kfar Mimon", heb: "\u05DB\u05E4\u05E8 \u05DE\u05D9\u05D9\u05DE\u05D5\u05DF", il: true, tz: 2, lat: 31.42, lon: -34.58 }, { name: "Karmiel", heb: "\u05DB\u05E8\u05DE\u05D9\u05D0\u05DC", il: true, tz: 2, lat: 32.92, lon: -35.3 }, { name: "Lod", heb: "\u05DC\u05D5\u05D3", il: true, tz: 2, lat: 31.95, lon: -34.88 }, { name: "Migdal Ha'Emek", heb: "\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05DE\u05E7", il: true, tz: 2, lat: 32.67, lon: -35.23 }, { name: "Meron", heb: "\u05DE\u05D9\u05E8\u05D5\u05DF", il: true, tz: 2, el: 900, lat: 32.98, lon: -35.43 }, { name: "Ma'agalim", heb: "\u05DE\u05E2\u05D2\u05DC\u05D9\u05DD", il: true, tz: 2, el: 150, lat: 31.48, lon: -34.67 }, { name: "Ma'aleh Adumim", heb: "\u05DE\u05E2\u05DC\u05D4 \u05D0\u05D3\u05D5\u05DE\u05D9\u05DD", il: true, tz: 2, lat: 31.77, lon: -35.3 }, { name: "Mitzpeh Ramon", heb: "\u05DE\u05E6\u05E4\u05D4 \u05E8\u05DE\u05D5\u05DF", il: true, tz: 2, el: 892, lat: 30.62, lon: -34.8 }, { name: "Ne'halel", heb: "\u05E0\u05D4\u05DC\u05DC", il: true, tz: 2, lat: 32.67, lon: -35.23 }, { name: "Nahariya", heb: "\u05E0\u05D4\u05E8\u05D9\u05D4", il: true, tz: 2, el: 25, lat: 33.02, lon: -35.1 }, { name: "Nir Eztyon", heb: "\u05E0\u05D9\u05E8 \u05E2\u05E6\u05D9\u05D5\u05DF", il: true, tz: 2, el: 220, lat: 32.7, lon: -34.98 }, { name: "Nesher", heb: "\u05E0\u05E9\u05E8", il: true, tz: 2, lat: 32.73, lon: -35.08 }, { name: "Netivot", heb: "\u05E0\u05EA\u05D9\u05D1\u05D5\u05EA", il: true, tz: 2, el: 142, lat: 31.42, lon: -34.58 }, { name: "Netanya", heb: "\u05E0\u05EA\u05E0\u05D9\u05D4", il: true, tz: 2, lat: 32.33, lon: -34.87 }, { name: "Ein Bokek", heb: "\u05E2\u05D9\u05DF \u05D1\u05D5\u05E7\u05E7", il: true, tz: 2, lat: 31.2, lon: -35.37 }, { name: "Acre", heb: "\u05E2\u05DB\u05D5", il: true, tz: 2, lat: 32.93, lon: -35.08 }, { name: "Eli", heb: "\u05E2\u05DC\u05D9", il: true, tz: 2, el: 720, lat: 32.07, lon: -35.27 }, { name: "Afula", heb: "\u05E2\u05E4\u05D5\u05DC\u05D4", il: true, tz: 2, el: 60, lat: 32.6, lon: -35.28 }, { name: "Etzyon Gaver", heb: "\u05E2\u05E6\u05D9\u05D5\u05DF \u05D2\u05D1\u05E8", il: true, tz: 2, el: 5, lat: 29.53, lon: -34.95 }, { name: "Arad", heb: "\u05E2\u05E8\u05D3", il: true, tz: 2, el: 640, lat: 31.27, lon: -35.22 }, { name: "Pardes Chana", heb: "\u05E4\u05E8\u05D3\u05E1 \u05D7\u05E0\u05D4", il: true, tz: 2, lat: 32.47, lon: -34.97 }, { name: "Petach Tikvah", heb: "\u05E4\u05EA\u05D7 \u05EA\u05E7\u05D5\u05D5\u05D4", il: true, tz: 2, lat: 32.08, lon: -34.88, cl: 40 }, { name: "Safed", heb: "\u05E6\u05E4\u05EA", il: true, tz: 2, el: 850, lat: 32.97, lon: -35.5 }, { name: "Kedumim", heb: "\u05E7\u05D3\u05D5\u05DE\u05D9\u05DD", il: true, tz: 2, el: 487, lat: 32.22, lon: -35.15 }, { name: "Komemiyut", heb: "\u05E7\u05D5\u05DE\u05DE\u05D9\u05D5\u05EA", il: true, tz: 2, el: 76, lat: 31.65, lon: -34.73 }, { name: "Kiryat Arba", heb: "\u05E7\u05E8\u05D9\u05EA \u05D0\u05E8\u05D1\u05E2", il: true, tz: 2, el: 987, lat: 31.52, lon: -35.1 }, { name: "Kiryat Gat", heb: "\u05E7\u05E8\u05D9\u05EA \u05D2\u05EA", il: true, tz: 2, el: 159, lat: 31.62, lon: -34.77 }, { name: "Kityat Tivon", heb: "\u05E7\u05E8\u05D9\u05EA \u05D8\u05D1\u05E2\u05D5\u05DF", il: true, tz: 2, el: 39, lat: 32.73, lon: -35.08 }, { name: "Kiryat Yam", heb: "\u05E7\u05E8\u05D9\u05EA \u05D9\u05DD", il: true, tz: 2, lat: 32.83, lon: -35.07 }, { name: "Kiryat Malachi", heb: "\u05E7\u05E8\u05D9\u05EA \u05DE\u05DC\u05D0\u05DB\u05D9", il: true, tz: 2, lat: 31.73, lon: -34.75 }, { name: "Modi'in Illit", heb: "\u05DE\u05D5\u05D3\u05D9\u05E2\u05D9\u05DF \u05E2\u05D9\u05DC\u05D9\u05EA", il: true, tz: 2, el: 240, lat: 31.93, lon: -35.04, cl: 30 }, { name: "Kiryat Shmona", heb: "\u05E7\u05E8\u05D9\u05EA \u05E9\u05DE\u05D5\u05E0\u05D4", il: true, tz: 2, lat: 33.2, lon: -35.57 }, { name: "Rosh Ha'ayin", heb: "\u05E8\u05D0\u05E9 \u05D4\u05E2\u05D9\u05DF", il: true, tz: 2, el: 90, lat: 32.08, lon: -34.95 }, { name: "Rosh Pina", heb: "\u05E8\u05D0\u05E9 \u05E4\u05D9\u05E0\u05D4", il: true, tz: 2, el: 131, lat: 32.97, lon: -35.48 }, { name: "Rishon Le'Tzion", heb: "\u05E8\u05D0\u05E9\u05D5\u05DF \u05DC\u05E6\u05D9\u05D5\u05DF", il: true, tz: 2, lat: 31.97, lon: -34.8 }, { name: "Rehovot", heb: "\u05E8\u05D7\u05D5\u05D1\u05D5\u05EA", il: true, tz: 2, el: 76, lat: 31.88, lon: -34.82 }, { name: "Ramla", heb: "\u05E8\u05DE\u05DC\u05D4", il: true, tz: 2, lat: 31.92, lon: -34.87 }, { name: "Ramat Hasharon", heb: "\u05E8\u05DE\u05EA \u05D4\u05E9\u05E8\u05D5\u05DF", il: true, tz: 2, el: 85, lat: 32.17, lon: -34.85 }, { name: "Ramat Magshimim", heb: "\u05E8\u05DE\u05EA \u05DE\u05D2\u05E9\u05D9\u05DE\u05D9\u05DD", il: true, tz: 2, el: 450, lat: 32.83, lon: -35.82 }, { name: "Ra'anana", heb: "\u05E8\u05E2\u05E0\u05E0\u05D4", il: true, tz: 2, el: 71, lat: 32.17, lon: -34.85 }, { name: "Shvi tzion", heb: "\u05E9\u05D1\u05D9 \u05E6\u05D9\u05D5\u05DF", il: true, tz: 2, lat: 33.02, lon: -35.1 }, { name: "Nablus", heb: "\u05E9\u05DB\u05DD", il: true, tz: 2, el: 667, lat: 32.22, lon: -35.27 }, { name: "Shalavim", heb: "\u05E9\u05DC\u05E2\u05D1\u05D9\u05DD", il: true, tz: 2, el: 194, lat: 31.87, lon: 34.98 }, { name: "Tushiya", heb: "\u05EA\u05D5\u05E9\u05D9\u05D4", il: true, tz: 2, lat: 31.42, lon: -34.58 }, { name: "Tel Aviv", heb: "\u05EA\u05DC \u05D0\u05D1\u05D9\u05D1", il: true, tz: 2, el: 20, lat: 32.07, lon: -34.77, cl: 21 }, { name: "Tifrach", heb: "\u05EA\u05E4\u05E8\u05D7", il: true, tz: 2, el: 173, lat: 31.32, lon: -34.67 }, { name: "Nazereth", heb: "\u05E0\u05E6\u05E8\u05EA", il: true, tz: 2, lat: 32.7, lon: -35.32 }, { name: "Menachemya", heb: "\u05DE\u05E0\u05D7\u05DE\u05D9\u05D4", il: true, tz: 2, lat: 32.6, lon: -35.55 }, { name: "Ramot", heb: "\u05E8\u05DE\u05D5\u05EA", il: true, tz: 2, el: 800, lat: 31.82, lon: -35.18 }, { name: "Katzrin", heb: "\u05E7\u05E6\u05E8\u05D9\u05DF", il: true, tz: 2, lat: 32.98, lon: -35.68 }, { name: "Hashmonaim", heb: "\u05D7\u05E9\u05DE\u05D5\u05E0\u05D0\u05D9\u05DD", il: true, tz: 2, el: 255, lat: 31.93, lon: -35.02 }, { name: "Laniado", heb: "\u05DC\u05E0\u05D9\u05D0\u05D3\u05D5 / \u05E0\u05EA\u05E0\u05D9\u05D4", il: true, tz: 2, el: 26, lat: 32.33, lon: -34.87 }, { name: "Melbourne", tz: 10, el: 35, lat: -37.82, lon: -144.97 }, { name: "Aukland", tz: 12, lat: -36.87, lon: -174.77 }, { name: "Boisbriand", tz: -5, lat: 45.62, lon: 73.85 }, { name: "Ottawa", tz: -5, lat: 45.42, lon: 75.7 }, { name: "Winnipeg", tz: -6, lat: 49.88, lon: 97.13 }, { name: "Toronto", tz: -5, el: 175, lat: 43.68, lon: 79.43 }, { name: "Montreal", tz: -5, el: 30, lat: 45.52, lon: 73.57 }, { name: "Eidenburg", tz: 0, el: 134, lat: 55.92, lon: 3.18 }, { name: "Algeria", tz: 1, lat: 36.82, lon: 2.98 }, { name: "Bogota", tz: -5, lat: 4.77, lon: 74.1 }, { name: "Brasilia", tz: -3, lat: 15.77, lon: 48.02 }, { name: "Goteborg", tz: 1, el: 100, lat: 57.7, lon: -11.95 }, { name: "Victoria", tz: 8, lat: 22.25, lon: -114.23 }, { name: "Touson", tz: -7, lat: 32.22, lon: 110.97 }, { name: "Tunville", tz: 1, lat: 49.4, lon: -6.17 }, { name: "Tkuarembo", tz: -3, lat: -31.7, lon: 55.98 }, { name: "Trumso", tz: 1, lat: 69.67, lon: -18.97 }, { name: "Johannesburg", tz: 2, el: 1655, lat: -26.3, lon: -28.18 }, { name: "Montevideo", tz: -3, el: 22, lat: -34.83, lon: 56.23 }, { name: "Meedan Columbia", tz: -5, lat: 6.23, lon: 75.58 }, { name: "Mexico City", tz: -6, lat: 19.45, lon: 98.95 }, { name: "New Delhi", tz: 5, lat: 28.58, lon: -77.22 }, { name: "Narwik", tz: 1, lat: 68.43, lon: -17.42 }, { name: "San Jose De Mayo", tz: -3, lat: -34.35, lon: 56.72 }, { name: "San Paulo", tz: -3, el: 790, lat: -23.6, lon: 46.67 }, { name: "Sunderland", tz: 0, lat: 54.93, lon: 1.43 }, { name: "Salford", tz: 0, lat: 53.5, lon: 2.25 }, { name: "San Jusinto Uruguay", tz: -3, lat: -34.55, lon: 55.87 }, { name: "New Square", tz: -5, lat: 41.1, lon: 74.07 }, { name: "Palm Springs", tz: -8, el: 125, lat: 33.83, lon: 116.67 }, { name: "Formosa", tz: -3, lat: -26.18, lon: 58.17 }, { name: "Panama", tz: -5, lat: 9.92, lon: 79.93 }, { name: "Perta", tz: 8, lat: -32, lon: -115.83 }, { name: "Peking", tz: 8, lat: 39.97, lon: -116.45 }, { name: "Zandiger (India)", tz: 5, lat: 30.73, lon: -76.78 }, { name: "The Equator", tz: 0, lat: 0, lon: 0 }, { name: "South Pole", tz: 0, lat: -90, lon: 0 }, { name: "North Pole", tz: 0, lat: 90, lon: 0 }, { name: "Caracas, Venezuela", tz: -4, lat: 10.37, lon: 66.88 }, { name: "Robonimi", tz: 1, lat: 66.48, lon: -25.7 }, { name: "Rio De Jinero", tz: -3, lat: -22.85, lon: 43.68 }, { name: "Phoenix", tz: -7, lat: 33.43, lon: 112.07 }, { name: "Lucerne", tz: 1, lat: 47.05, lon: -8.32 }, { name: "Odessa", tz: 2, lat: 46.48, lon: -30.72 }, { name: "Uman", tz: 2, lat: 48.73, lon: -30.23 }, { name: "Ifran", tz: 0, lat: 33.53, lon: 5.1 }, { name: "Alsund Norway", tz: 1, lat: 62.47, lon: -6.18 }, { name: "Athens", tz: 2, lat: 37.97, lon: -23.72 }, { name: "Bad", tz: 1, lat: 50.2, lon: -10.08 }, { name: "Bucharest", tz: 2, lat: 44.38, lon: -26.4 }, { name: "Gomel", tz: 2, lat: 52.38, lon: -30.83 }, { name: "Gibraltar", tz: 1, lat: 36.13, lon: 5.35 }, { name: "Gateside", tz: 0, lat: 54.95, lon: 1.6 }, { name: "Vienna", tz: 1, lat: 48.22, lon: -16.37 }, { name: "Venice", tz: 1, lat: 45.38, lon: -12.47 }, { name: "Warsaw", tz: 1, lat: 52.23, lon: -21 }, { name: "Toulon", tz: 1, lat: 43.15, lon: -5.87 }, { name: "Torberey Scotland", tz: 0, lat: 55.3, lon: 4.82 }, { name: "Lusan", tz: 1, el: 375, lat: 46.53, lon: -6.62 }, { name: "London", tz: 0, el: 45, lat: 51.6, lon: 0.1 }, { name: "Luxenbourg", tz: 1, lat: 49.67, lon: -6.17 }, { name: "Liverpool", tz: 0, lat: 53.42, lon: 2.98 }, { name: "Leeds", tz: 0, lat: 53.8, lon: 1.57 }, { name: "Medisimo Italy", tz: 1, el: 1500, lat: 46.43, lon: -9.33 }, { name: "Madrid", tz: 1, lat: 40.4, lon: 3.7 }, { name: "Monterrey, Mexico", tz: 1, lat: 46.4, lon: -6.87 }, { name: "Moscow", tz: 3, el: 154, lat: 55.75, lon: -37.62 }, { name: "Milano", tz: 1, el: 122, lat: 45.45, lon: -9.18 }, { name: "Minsk", tz: 2, lat: 53.87, lon: -27.82 }, { name: "Malaga", tz: 1, lat: 36.7, lon: 4.42 }, { name: "Manchester", tz: 0, lat: 53.5, lon: 2.23 }, { name: "Meknes", tz: 0, lat: 33.9, lon: 5.57 }, { name: "Marseille", tz: 1, lat: 43.3, lon: -5.32 }, { name: "Marrakech", tz: 0, lat: 31.6, lon: 7.98 }, { name: "New Castle", tz: 0, lat: 54.95, lon: 1.62 }, { name: "Nice France", tz: 1, lat: 43.7, lon: -7.18 }, { name: "Fes", tz: 0, lat: 34.03, lon: 4.98 }, { name: "Prague", tz: 1, el: 180, lat: 50.08, lon: -14.42 }, { name: "Frankfurt", tz: 1, lat: 50.12, lon: -8.65 }, { name: "Frankfurt On Maine", tz: 1, lat: 50.1, lon: -8.68 }, { name: "Zurich", tz: 1, el: 410, lat: 47.37, lon: -8.53 }, { name: "Copenhagen", tz: 1, lat: 55.77, lon: -12.33 }, { name: "Casablanca", tz: 0, lat: 33.58, lon: 7.58 }, { name: "Kiev", tz: 2, lat: 50.43, lon: -30.52 }, { name: "Colon", tz: 1, el: 46, lat: 50.9, lon: -6.93 }, { name: "Robet", tz: 0, lat: 34.02, lon: 6.8 }, { name: "Rodes", tz: 2, lat: 36.4, lon: -28.18 }, { name: "Rome", tz: 1, lat: 41.9, lon: -12.5 }, { name: "Shpolgen", tz: 1, lat: 46.55, lon: -9.32 }, { name: "Baku", tz: 2, lat: 40.4, lon: -49.82 }, { name: "Tarvisio", tz: 1, lat: 46.5, lon: -13.58 }, { name: "windischgarsten", tz: 1, lat: 47.72, lon: -14.32 }, { name: "Nesslau", tz: 1, lat: 47.2, lon: -9.2 }, { name: "Deerfield Beach", tz: -5, lat: 26.32, lon: 80.08 }, { name: "Hartford CT", tz: -5, lat: 41.75, lon: 72.7 }, { name: "Boro Park, Brooklyn NY", tz: -5, lat: 40.63, lon: 74 }, { name: "Brooklyn NY", tz: -5, lat: 40.63, lon: 73.95 }, { name: "Denver", tz: -7, el: 1601, lat: 39.75, lon: 104.93 }, { name: "Houston", tz: -6, el: 29, lat: 29.83, lon: 95.35 }, { name: "Hollywood", tz: -5, el: 8, lat: 26.1, lon: 80.2 }, { name: "Washington DC", tz: -5, lat: 38.9, lon: 77.03 }, { name: "Los Angeles", tz: -8, lat: 34.05, lon: 118.23 }, { name: "Lakewood NJ", tz: -5, lat: 40.1, lon: 74.23 }, { name: "Monticello NY", tz: -5, lat: 41.65, lon: 74.73 }, { name: "Monsey NY", tz: -5, lat: 41.1, lon: 74.07 }, { name: "Miami", tz: -5, el: 2, lat: 25.83, lon: 80.27 }, { name: "Miami Beach", tz: -5, el: 3, lat: 25.78, lon: 80.28 }, { name: "Milwaukee", tz: -6, lat: 43.03, lon: 87.92 }, { name: "Miniappolis", tz: -6, el: 253, lat: 44.88, lon: 93.22 }, { name: "Memphis TN", tz: -6, lat: 35.13, lon: 90.03 }, { name: "New Orleans", tz: -6, el: 1, lat: 30, lon: 90.12 }, { name: "New Square NY", tz: -5, lat: 41.1, lon: 74.07 }, { name: "San Juan", tz: -8, lat: 37.33, lon: 121.88 }, { name: "San Diego", tz: -8, lat: 32.72, lon: 117.13 }, { name: "Saint Louis", tz: -6, lat: 38.65, lon: 90.32 }, { name: "Pittsburgh", tz: -5, lat: 40.4, lon: 80.03 }, { name: "Philadelphia", tz: -5, lat: 39.93, lon: 75.17 }, { name: "Providence RI", tz: -5, lat: 41.82, lon: 71.4 }, { name: "Kansas City", tz: -6, el: 225, lat: 39.1, lon: 94.6 }, { name: "Kiryas Joel NY", tz: -5, lat: 41.33, lon: 74.17 }, { name: "Cali", tz: -5, lat: 3.45, lon: 76.52 }, { name: "Medellin", tz: -5, lat: 6.25, lon: 75.57 }, { name: "Honolulu", tz: -10, lat: 21.32, lon: 157.83 }, { name: "Santiago de Chile", tz: -4, lat: -33.45, lon: 70.67 }, { name: "Nairobi", tz: 3, lat: -1.28, lon: -36.82 }, { name: "Taipei", tz: 8, lat: 25.05, lon: -121.5 }, { name: "Rangun (GMT+6)", tz: 6, lat: 16.78, lon: -96.17 }, { name: "Rangun (GMT+7)", tz: 7, lat: 16.78, lon: -96.17 }, { name: "Rio de Janeiro", tz: -3, lat: -22.9, lon: 43.25 }, { name: "Kapstadt (Capetown)", tz: 2, lat: -33.9, lon: -18.37 }, { name: "San Juan (P.R.)", tz: -4, lat: 18.47, lon: 66.1 }, { name: "Elizabeth, N.J, US", tz: -5, lat: 40.67, lon: 74.18 }, { name: "Aach", tz: 1, lat: 47.83, lon: -8.85 }, { name: "Adelsheim", tz: 1, lat: 49.4, lon: -9.38 }, { name: "Altlandsberg", tz: 1, lat: 52.55, lon: -13.72 }, { name: "Angerm\xFCnde", tz: 1, lat: 53.02, lon: -14 }, { name: "Anklam", tz: 1, lat: 53.85, lon: -13.68 }, { name: "Annaberg", tz: 1, lat: 57.52, lon: -13.43 }, { name: "Ansbach", tz: 1, lat: 49.28, lon: -10.57 }, { name: "Apolda", tz: 1, lat: 51.02, lon: -11.52 }, { name: "Arnstadt", tz: 1, lat: 50.83, lon: -10.95 }, { name: "Aschersleben", tz: 1, lat: 51.75, lon: -11.45 }, { name: "Bad Berka", tz: 1, lat: 50.9, lon: -11.28 }, { name: "Bad Cannstatt", tz: 1, lat: 48.8, lon: -9.18 }, { name: "Bad Freienwalde", tz: 1, lat: 52.78, lon: -14.02 }, { name: "Bad Gottleuba", tz: 1, lat: 50.85, lon: -13.93 }, { name: "Bad Krozingen", tz: 1, lat: 47.92, lon: -7.72 }, { name: "Bad Mergenheim", tz: 1, lat: 49.5, lon: -9.77 }, { name: "Bad Mingolsheim", tz: 1, lat: 49.23, lon: -8.65 }, { name: "Bad Rappenau", tz: 1, lat: 49.32, lon: -9.1 }, { name: "Bad Salzungen", tz: 1, lat: 50.8, lon: -10.22 }, { name: "Bad Wilznack", tz: 1, lat: 52.95, lon: -11.95 }, { name: "Bad Wimpfen", tz: 1, lat: 49.23, lon: -9.15 }, { name: "Baiersdorf", tz: 1, lat: 49.65, lon: -11.02 }, { name: "Ballenstedt", tz: 1, lat: 51.72, lon: -11.23 }, { name: "Barby", tz: 1, lat: 51.97, lon: -11.88 }, { name: "Bautzen", tz: 1, lat: 51.18, lon: -14.43 }, { name: "Beelitz", tz: 1, lat: 52.23, lon: -12.97 }, { name: "Beeskow", tz: 1, lat: 52.17, lon: -14.23 }, { name: "Bernau", tz: 1, lat: 47.8, lon: -12.37 }, { name: "Bernburg", tz: 1, lat: 51.8, lon: -11.73 }, { name: "Biesenthal", tz: 1, lat: 52.77, lon: -13.62 }, { name: "Bleicherode", tz: 1, lat: 51.43, lon: -10.57 }, { name: "Boizenburg", tz: 1, lat: 53.37, lon: -10.72 }, { name: "Borna", tz: 1, lat: 51.32, lon: -13.18 }, { name: "Breisach", tz: 1, lat: 48.02, lon: -7.67 }, { name: "Br\xFCel", tz: 1, lat: 53.73, lon: -11.72 }, { name: "Burg", tz: 1, lat: 52.27, lon: -11.85 }, { name: "B\xFCtzow", tz: 1, lat: 53.83, lon: -11.98 }, { name: "Calbe", tz: 1, lat: 51.9, lon: -11.77 }, { name: "Calv\xF6rde", tz: 1, lat: 52.38, lon: -11.28 }, { name: "Caputh", tz: 1, lat: 52.35, lon: -13 }, { name: "Coesfeld", tz: 1, lat: 51.93, lon: -7.17 }, { name: "Coswig", tz: 1, lat: 51.88, lon: -12.43 }, { name: "Crivitz", tz: 1, lat: 53.58, lon: -11.63 }, { name: "Dargun", tz: 1, lat: 53.9, lon: -12.85 }, { name: "Deggendorf", tz: 1, lat: 48.85, lon: -12.98 }, { name: "Delitzsch", tz: 1, lat: 51.52, lon: -12.33 }, { name: "Aachen", tz: 1, lat: 50.78, lon: -6.08 }, { name: "Altensteig", tz: 1, lat: 48.58, lon: -8.6 }, { name: "Amberg", tz: 1, lat: 49.45, lon: -11.87 }, { name: "Augsburg", tz: 1, lat: 48.38, lon: -10.88 }, { name: "Aurich", tz: 1, lat: 53.47, lon: -7.48 }, { name: "Bad Kissingen", tz: 1, lat: 50.2, lon: -10.05 }, { name: "Bad Kreuznach", tz: 1, lat: 49.87, lon: -7.85 }, { name: "Bad Nauheim", tz: 1, lat: 50.37, lon: -8.73 }, { name: "Baden-Baden", tz: 1, lat: 48.77, lon: -8.23 }, { name: "Bamberg", tz: 1, lat: 49.88, lon: -10.88 }, { name: "Bayreuth", tz: 1, lat: 49.95, lon: -11.58 }, { name: "Berlin", tz: 1, lat: 52.52, lon: -13.38 }, { name: "Bielefeld", tz: 1, lat: 52.02, lon: -8.52 }, { name: "Bonn", tz: 1, lat: 50.73, lon: -7.1 }, { name: "Brandenburg", tz: 1, lat: 52.4, lon: -12.53 }, { name: "Braunschweig", tz: 1, lat: 52.27, lon: -10.52 }, { name: "Bremen", tz: 1, lat: 53.07, lon: -8.82 }, { name: "Bremerhaven", tz: 1, lat: 53.55, lon: -8.57 }, { name: "Calw", tz: 1, lat: 48.72, lon: -8.73 }, { name: "Celle", tz: 1, lat: 52.62, lon: -10.08 }, { name: "Chemnitz", tz: 1, lat: 50.83, lon: -12.92 }, { name: "Cottbus", tz: 1, lat: 51.75, lon: -14.32 }, { name: "Dachau", tz: 1, lat: 48.25, lon: -11.45 }, { name: "Darmstadt", tz: 1, lat: 49.88, lon: -8.67 }, { name: "Dessau", tz: 1, lat: 51.83, lon: -12.23 }, { name: "Dortmund", tz: 1, lat: 51.52, lon: -7.47 }, { name: "Dresden", tz: 1, lat: 51.05, lon: -13.73 }, { name: "Duisburg", tz: 1, lat: 51.42, lon: -6.77 }, { name: "D\xFCsseldorf", tz: 1, lat: 51.2, lon: -6.78 }, { name: "Emmendingen", tz: 1, lat: 48.12, lon: -7.83 }, { name: "Erfurt", tz: 1, lat: 50.97, lon: -11.02 }, { name: "Essen/Ruhr", tz: 1, lat: 51.47, lon: -7.02 }, { name: "Frankfurt/Main", tz: 1, lat: 50.12, lon: -8.67 }, { name: "Frankfurt/Oder", tz: 1, lat: 52.33, lon: -14.55 }, { name: "Freiburg i. Br.", tz: 1, lat: 47.98, lon: -7.85 }, { name: "F\xFCrth", tz: 1, lat: 49.47, lon: -10.98 }, { name: "Fulda", tz: 1, lat: 50.55, lon: -9.68 }, { name: "Gelsenkirchen", tz: 1, lat: 51.52, lon: -7.12 }, { name: "Gie\xDFen", tz: 1, lat: 50.58, lon: -8.67 }, { name: "G\xF6ttingen", tz: 1, lat: 51.53, lon: -9.92 }, { name: "Grabow", tz: 1, lat: 53.27, lon: -11.57 }, { name: "Hagen (Westf)", tz: 1, lat: 51.37, lon: -7.47 }, { name: "Halle/Saale", tz: 1, lat: 51.48, lon: -11.97 }, { name: "Hamburg", tz: 1, lat: 53.55, lon: -9.98 }, { name: "Hameln", tz: 1, lat: 52.1, lon: -9.35 }, { name: "Hannover", tz: 1, lat: 52.4, lon: -9.73 }, { name: "Havelberg", tz: 1, lat: 52.83, lon: -12.07 }, { name: "Heidelberg", tz: 1, lat: 49.42, lon: -8.72 }, { name: "Herford", tz: 1, lat: 52.1, lon: -8.67 }, { name: "Hessisch Oldendorf", tz: 1, lat: 52.17, lon: -9.25 }, { name: "Hildesheim", tz: 1, lat: 52.15, lon: -9.95 }, { name: "Hof", tz: 1, lat: 50.3, lon: -11.92 }, { name: "Idar-Oberstein", tz: 1, lat: 49.7, lon: -7.32 }, { name: "Kaiserslautern", tz: 1, lat: 49.43, lon: -7.77 }, { name: "Karlsruhe", tz: 1, lat: 49.05, lon: -8.4 }, { name: "Kassel", tz: 1, lat: 51.32, lon: -9.47 }, { name: "Kiel", tz: 1, lat: 54.33, lon: -10.13 }, { name: "Kleinmachnow", tz: 1, lat: 52.4, lon: -13.25 }, { name: "Koblenz", tz: 1, lat: 50.35, lon: -7.58 }, { name: "K\xF6ln", tz: 1, lat: 50.93, lon: -6.98 }, { name: "Krefeld", tz: 1, lat: 51.33, lon: -6.57 }, { name: "Leipzig", tz: 1, lat: 51.32, lon: -12.33 }, { name: "L\xF6rrach", tz: 1, lat: 47.62, lon: -7.67 }, { name: "L\xFCbeck", tz: 1, lat: 53.87, lon: -10.67 }, { name: "Ludwigshafen", tz: 1, lat: 49.48, lon: -8.43 }, { name: "Ludwigslust", tz: 1, lat: 53.32, lon: -11.5 }, { name: "Magdeburg", tz: 1, lat: 52.12, lon: -11.63 }, { name: "Mainz", tz: 1, lat: 50.02, lon: -8.27 }, { name: "Mannheim", tz: 1, lat: 49.48, lon: -8.47 }, { name: "Marburg", tz: 1, lat: 50.82, lon: -8.77 }, { name: "Minden", tz: 1, lat: 52.28, lon: -8.92 }, { name: "M\xF6nchengladbach", tz: 1, lat: 51.2, lon: -6.47 }, { name: "M\xFCnchen", tz: 1, lat: 48.13, lon: -11.57 }, { name: "Nagold", tz: 1, lat: 48.55, lon: -8.72 }, { name: "Neum\xFCnster", tz: 1, lat: 54.07, lon: -9.98 }, { name: "Neuruppin", tz: 1, lat: 52.92, lon: -12.8 }, { name: "Neustadt/Weinstra\xDFe", tz: 1, lat: 49.35, lon: -8.13 }, { name: "Neustrelitz", tz: 1, lat: 53.35, lon: -13.07 }, { name: "N\xFCrnberg", tz: 1, lat: 49.45, lon: -11.07 }, { name: "Offenbach", tz: 1, lat: 50.13, lon: -8.78 }, { name: "Oldenburg", tz: 1, lat: 53.13, lon: -8.22 }, { name: "Oldenburg in Holstein", tz: 1, lat: 54.28, lon: -10.87 }, { name: "Osnabr\xFCck", tz: 1, lat: 52.27, lon: -8.03 }, { name: "Paderborn", tz: 1, lat: 51.72, lon: -8.73 }, { name: "Perleberg", tz: 1, lat: 53.07, lon: -11.85 }, { name: "Pforzheim", tz: 1, lat: 48.9, lon: -8.7 }, { name: "Potsdam", tz: 1, lat: 52.4, lon: -13.07 }, { name: "Pritzwalk", tz: 1, lat: 53.15, lon: -12.17 }, { name: "Rathenow", tz: 1, lat: 52.6, lon: -12.33 }, { name: "Recklinghausen", tz: 1, lat: 51.6, lon: -7.22 }, { name: "Regensburg", tz: 1, lat: 49.02, lon: -12.1 }, { name: "Rinteln", tz: 1, lat: 52.18, lon: -9.05 }, { name: "Rostock", tz: 1, lat: 54.08, lon: -12.12 }, { name: "Saarbr\xFCcken", tz: 1, lat: 49.23, lon: -6.98 }, { name: "Salzgitter", tz: 1, lat: 52.17, lon: -10.42 }, { name: "Schwerin", tz: 1, lat: 53.63, lon: -11.42 }, { name: "Sobernheim", tz: 1, lat: 49.78, lon: -7.63 }, { name: "Stendal", tz: 1, lat: 52.6, lon: -11.85 }, { name: "Straubing", tz: 1, lat: 48.88, lon: -12.57 }, { name: "Strausberg", tz: 1, lat: 52.58, lon: -13.88 }, { name: "Stuttgart", tz: 1, lat: 48.77, lon: -9.18 }, { name: "Trier", tz: 1, lat: 49.75, lon: -6.63 }, { name: "T\xFCbingen", tz: 1, lat: 48.52, lon: -9.03 }, { name: "Weiden in der Oberpfalz", tz: 1, lat: 49.68, lon: -12.17 }, { name: "Wiesbaden", tz: 1, lat: 50.08, lon: -8.23 }, { name: "Wismar", tz: 1, lat: 53.88, lon: -11.47 }, { name: "Wittenberg", tz: 1, lat: 51.87, lon: -12.65 }, { name: "Wittenberge", tz: 1, lat: 53, lon: -11.73 }, { name: "Wittstock", tz: 1, lat: 53.17, lon: -12.48 }, { name: "W\xF6rlitz", tz: 1, lat: 51.83, lon: -12.42 }, { name: "Wuppertal", tz: 1, lat: 51.27, lon: -7.18 }, { name: "W\xFCrzburg", tz: 1, lat: 49.8, lon: -9.93 }, { name: "Basel", tz: 1, lat: 47.63, lon: -7.67 }, { name: "Bern", tz: 1, lat: 46.95, lon: -7.43 }, { name: "Bremgarten", tz: 1, lat: 47.35, lon: -8.35 }, { name: "Geneve", tz: 1, lat: 46.2, lon: -6.15 }, { name: "M\xFCnsingen", tz: 1, lat: 46.88, lon: -7.57 }, { name: "Sankt Gallen", tz: 1, lat: 47.42, lon: -9.38 }, { name: "Vevey", tz: 1, lat: 46.47, lon: -6.85 }, { name: "Winterthur", tz: 1, lat: 47.5, lon: -8.72 }, { name: "Zug", tz: 1, lat: 47.17, lon: -8.52 }, { name: "Z\xFCrich", tz: 1, lat: 47.38, lon: -8.53 }, { name: "Graz", tz: 1, lat: 47.08, lon: -15.45 }, { name: "Innsbruck", tz: 1, lat: 47.27, lon: -11.4 }, { name: "Linz", tz: 1, lat: 48.3, lon: -14.3 }, { name: "Salzburg", tz: 1, lat: 47.8, lon: -13.03 }, { name: "Wien", tz: 1, lat: 48.22, lon: -16.33 }, { name: "Antwerpen", tz: 1, lat: 51.22, lon: -4.42 }, { name: "Arlon", tz: 1, lat: 49.68, lon: -5.82 }, { name: "Br\xFCssel", tz: 1, lat: 50.83, lon: -4.33 }, { name: "Charleroi", tz: 1, lat: 50.42, lon: -4.43 }, { name: "Gent", tz: 1, lat: 51.05, lon: -3.72 }, { name: "Knokke", tz: 1, lat: 51.35, lon: -3.28 }, { name: "Li\xE9ge", tz: 1, lat: 50.63, lon: -5.57 }, { name: "Mons", tz: 1, lat: 50.45, lon: -3.93 }, { name: "Ostende", tz: 1, lat: 51.22, lon: -2.9 }, { name: "Amersfoort", tz: 1, lat: 52.15, lon: -5.4 }, { name: "Amsterdam", tz: 1, lat: 52.37, lon: -4.9 }, { name: "Arnheim", tz: 1, lat: 52.02, lon: -5.88 }, { name: "Bussum", tz: 1, lat: 52.27, lon: -5.15 }, { name: "Den Haag", tz: 1, lat: 52.1, lon: -4.3 }, { name: "Eindhoven", tz: 1, lat: 51.43, lon: -5.47 }, { name: "Enschede", tz: 1, lat: 52.2, lon: -6.88 }, { name: "Groningen", tz: 1, lat: 53.22, lon: -6.55 }, { name: "Hilversum", tz: 1, lat: 52.23, lon: -5.15 }, { name: "Leiden", tz: 1, lat: 52.15, lon: -4.5 }, { name: "Maastricht", tz: 1, lat: 50.87, lon: -5.72 }, { name: "Rotterdam", tz: 1, lat: 51.92, lon: -4.47 }, { name: "Tilburg", tz: 1, lat: 51.57, lon: -5.08 }, { name: "Utrecht", tz: 1, lat: 52.08, lon: -5.13 }, { name: "Zwolle", tz: 1, lat: 52.5, lon: -6.08 }, { name: "Crossen", tz: 1, lat: 50.75, lon: -12.48 }, { name: "Krakau", tz: 1, lat: 50.05, lon: -19.95 }, { name: "Lodz", tz: 1, lat: 51.77, lon: -19.22 }, { name: "Tarn\xF3w", tz: 1, lat: 52.78, lon: -14.97 }, { name: "Warschau", tz: 1, lat: 52.25, lon: -21 }, { name: "Wroczlaw (Breslau)", tz: 1, lat: 51.1, lon: -17 }, { name: "Birobidzan", tz: 9, lat: 48.8, lon: -132.95 }, { name: "Irkutsk", tz: 8, lat: 52.27, lon: -104.33 }, { name: "Kiew", tz: 2, lat: 50.43, lon: -30.52 }, { name: "Moskau", tz: 3, lat: 55.75, lon: -37.58 }, { name: "St. Petersburg", tz: 3, lat: 59.92, lon: -30.25 }, { name: "Taschkent", tz: 6, lat: 41.33, lon: -69.3 }, { name: "Tblisi", tz: 3, lat: 41.72, lon: -44.82 }, { name: "Montreal, Fr.", tz: 1, lat: 47.53, lon: -4.02 }, { name: "Lausanne", tz: 1, lat: 46.52, lon: -6.63 }, { name: "Nice", tz: 1, lat: 43.7, lon: -7.25 }, { name: "Paris", tz: 1, lat: 48.87, lon: -2.33 }, { name: "Birmingham", tz: 0, lat: 52.5, lon: 1.83 }, { name: "Bradford", tz: 0, lat: 53.8, lon: 1.75 }, { name: "Bristol", tz: 0, lat: 51.45, lon: 2.58 }, { name: "Edinburgh", tz: 0, lat: 55.95, lon: 3.22 }, { name: "Gateshead", tz: 0, lat: 54.97, lon: 1.62 }, { name: "Glasgow", tz: 0, lat: 55.88, lon: 4.25 }, { name: "Sheffield", tz: 0, lat: 53.38, lon: 1.5 }, { name: "Belfast", tz: 0, lat: 54.58, lon: 5.92 }, { name: "Dublin", tz: 0, lat: 53.33, lon: 6.25 }, { name: "Tralee", tz: 0, lat: 52.27, lon: 9.7 }, { name: "Atlanta (Ga., US)", tz: -5, lat: 33.75, lon: 84.38 }, { name: "Baltimore, MD", tz: -5, lat: 39.28, lon: 76.62 }, { name: "Bentonville, Arkansas", tz: -6, lat: 36.37, lon: 94.22 }, { name: "Boston, MA", tz: -5, lat: 42.35, lon: 71.07 }, { name: "Buffalo", tz: -5, lat: 42.9, lon: 78.88 }, { name: "Burlington (VT, US)", tz: -5, lat: 44.48, lon: 73.22 }, { name: "Canton, Ohio", tz: -5, lat: 40.78, lon: 81.37 }, { name: "Charleston (S.C., US)", tz: -5, lat: 32.78, lon: 79.93 }, { name: "Charlotte (N.C., US)", tz: -5, lat: 35.23, lon: 80.83 }, { name: "Chicago", tz: -6, lat: 41.88, lon: 87.63 }, { name: "Cincinnati, OH", tz: -5, lat: 39.1, lon: 84.63 }, { name: "Cleveland (Ohio, US)", tz: -5, lat: 41.5, lon: 81.68 }, { name: "Columbus, OH", tz: -5, lat: 39.95, lon: 83 }, { name: "Dallas, TX", tz: -6, lat: 32.78, lon: 96.8 }, { name: "Denver (Colo., US)", tz: -7, lat: 39.72, lon: 105.02 }, { name: "Detroit, MI", tz: -5, lat: 42.33, lon: 83.05 }, { name: "Essexville, MI", tz: -5, lat: 43.62, lon: 83.83 }, { name: "Fairbanks, AK", tz: -10, lat: 64.85, lon: 147.72 }, { name: "Flagstaff, Arizona", tz: -7, lat: 35.18, lon: 111.65 }, { name: "Hartford (Conn., US)", tz: -5, lat: 41.77, lon: 72.68 }, { name: "Houston, TX", tz: -6, lat: 29.77, lon: 95.37 }, { name: "Indianapolis, Indiana", tz: -6, lat: -19.03, lon: 47.92 }, { name: "Kansas City (Kans., US)", tz: -6, lat: 39.12, lon: 94.65 }, { name: "Little Rock", tz: -6, lat: 34.73, lon: 92.25 }, { name: "Los Angeles (LA)", tz: -8, lat: 34.05, lon: 118.25 }, { name: "Louisville (Ky., US)", tz: -5, lat: 38.25, lon: 85.75 }, { name: "Madison (Wis., US)", tz: -6, lat: 43.08, lon: 89.37 }, { name: "Memphis (Tenn., US)", tz: -6, lat: 35.13, lon: 90.05 }, { name: "Miami, FL", tz: -5, lat: 25.77, lon: 80.2 }, { name: "Miami Beach, FL", tz: -5, lat: 25.78, lon: 80.13 }, { name: "Milwaukee (Wis., US)", tz: -6, lat: 43.03, lon: 87.92 }, { name: "Minneapolis, Minnesota", tz: -6, lat: 44.98, lon: 93.22 }, { name: "Mobile", tz: -6, lat: 30.7, lon: 88.08 }, { name: "Monticello", tz: -5, lat: 41.65, lon: 74.7 }, { name: "Naples (Fla., US)", tz: -5, lat: 26.13, lon: 81.8 }, { name: "Nashville (Tenn., US)", tz: -6, lat: 36.15, lon: 86.8 }, { name: "New Brunswick", tz: -5, lat: 40.48, lon: 74.45 }, { name: "New Haven (Conn., US)", tz: -5, lat: 41.3, lon: 72.93 }, { name: "New Orleans, Louisiana", tz: -6, lat: 29.97, lon: 90.12 }, { name: "New York, NY", tz: -5, lat: 40.72, lon: 74.02 }, { name: "New York, Brooklyn", tz: -5, lat: 40.7, lon: 74 }, { name: "Newark (N.J., US)", tz: -5, lat: 40.73, lon: 74.15 }, { name: "Newport (R.I., US)", tz: -5, lat: 41.22, lon: 71.3 }, { name: "Omaha, Nebraska", tz: -6, lat: 41.27, lon: 95.95 }, { name: "Orlando, FL", tz: -5, lat: 28.53, lon: 81.38 }, { name: "Philadelphia, Pennsylvania", tz: -5, lat: 39.95, lon: 75.1 }, { name: "Phoenix, Arizona", tz: -7, lat: 33.45, lon: 112.08 }, { name: "Pittsburgh, Pennsylvania", tz: -5, lat: 40.43, lon: 80 }, { name: "Portland (Maine, US)", tz: -5, lat: 43.65, lon: 70.28 }, { name: "Portland (Oreg, US)", tz: -8, lat: 45.55, lon: 112.6 }, { name: "Providence, RI", tz: -5, lat: 41.83, lon: 71.42 }, { name: "Salt Lake City, Utah", tz: -7, lat: 40.77, lon: 111.88 }, { name: "San Antonio, TX", tz: -6, lat: 29.47, lon: 98.52 }, { name: "San Francisco", tz: -8, lat: 37.78, lon: 122.4 }, { name: "Santa Fe (N.Mex., US)", tz: -7, lat: 35.7, lon: 106.95 }, { name: "Seattle, WA", tz: -8, lat: 47.6, lon: 122.33 }, { name: "Silver Spring", tz: -5, lat: 39.03, lon: 77.05 }, { name: "Springfield (Mass., US)", tz: -5, lat: 42.12, lon: 72.6 }, { name: "Stamford, CA", tz: -5, lat: 41.05, lon: 73.55 }, { name: "St. Louis", tz: -6, lat: 38.63, lon: 90.18 }, { name: "Tampa, FL", tz: -5, lat: 27.95, lon: 82.45 }, { name: "Topeka (KS, US)", tz: -6, lat: 39.05, lon: 95.68 }, { name: "Tucson", tz: -7, lat: 32.22, lon: 110.97 }, { name: "Washington, DC", tz: -5, lat: 38.9, lon: 77.02 }, { name: "Wichita, TX", tz: -6, lat: 37.67, lon: 97.33 }, { name: "Yellowstone Lake", tz: -7, lat: 44.42, lon: 110.37 }, { name: "Ancona", tz: 1, lat: 43.63, lon: -13.5 }, { name: "Asti", tz: 1, lat: 44.9, lon: -8.18 }, { name: "Bologna", tz: 1, lat: 44.48, lon: -11.33 }, { name: "Ferrara", tz: 1, lat: 44.83, lon: -11.58 }, { name: "Florenz", tz: 1, lat: 43.77, lon: -11.25 }, { name: "Genua", tz: 1, lat: 44.42, lon: -8.95 }, { name: "Livorno", tz: 1, lat: 43.55, lon: -10.32 }, { name: "Mantova", tz: 1, lat: 45.15, lon: -10.8 }, { name: "Meran", tz: 1, lat: 46.67, lon: -11.15 }, { name: "Mailand", tz: 1, lat: 45.47, lon: -9.18 }, { name: "Modena", tz: 1, lat: 44.67, lon: -10.92 }, { name: "Neapel", tz: 1, lat: 40.85, lon: -14.28 }, { name: "Padova", tz: 1, lat: 45.42, lon: -11.88 }, { name: "Parma", tz: 1, lat: 44.8, lon: -10.32 }, { name: "Perugia", tz: 1, lat: 43.13, lon: -12.37 }, { name: "Pisa", tz: 1, lat: 43.72, lon: -10.38 }, { name: "Rom", tz: 1, lat: 41.9, lon: -12.48 }, { name: "Siena", tz: 1, lat: 43.32, lon: -11.35 }, { name: "Spiazzo", tz: 1, lat: 46.12, lon: -10.67 }, { name: "Trieste", tz: 1, lat: 45.67, lon: -13.77 }, { name: "Turin", tz: 1, lat: 45.07, lon: -7.67 }, { name: "Venedig", tz: 1, lat: 45.45, lon: -12.35 }, { name: "Verona", tz: 1, lat: 45.45, lon: -11 }, { name: "Alburquerque", tz: 1, lat: 39.22, lon: 7 }, { name: "Alicante", tz: 1, lat: 38.35, lon: 0.47 }, { name: "Barcelona", tz: 1, lat: 41.38, lon: -2.18 }, { name: "Mallorca", tz: 1, lat: 39.48, lon: -3 }, { name: "Marbella", tz: 1, lat: 36.52, lon: 4.88 }, { name: "Sevilla", tz: 1, lat: 37.37, lon: 5.98 }, { name: "Torremolinos", tz: 1, lat: 36.6, lon: 4.5 }, { name: "Valencia", tz: 1, lat: 39.47, lon: 0.37 }, { name: "Belmonte", tz: 0, lat: 40.37, lon: 7.37 }, { name: "Lissabon", tz: 0, lat: 38.72, lon: 9.13 }, { name: "Porto", tz: 0, lat: 41.18, lon: 8.6 }, { name: "Athen", tz: 2, lat: 37.97, lon: -23.72 }, { name: "Korfu", tz: 2, lat: 39.6, lon: -19.92 }, { name: "Rhodos", tz: 2, lat: 36.17, lon: -28 }, { name: "Saloniki", tz: 2, lat: 40.65, lon: -23.02 }, { name: "Trikala", tz: 2, lat: 39.57, lon: -21.77 }, { name: "Volos", tz: 2, lat: 39.35, lon: -22.93 }, { name: "Ankara", tz: 2, lat: 39.93, lon: -32.87 }, { name: "Bursa", tz: 2, lat: 40.18, lon: -29.07 }, { name: "Istanbul", tz: 2, lat: 41.02, lon: -28.97 }, { name: "Izmir", tz: 2, lat: 38.42, lon: -27.15 }, { name: "Esch-sur-Alzette", tz: 1, lat: 49.5, lon: -5.98 }, { name: "Luxemburg", tz: 1, lat: 49.6, lon: -6.15 }, { name: "Kopenhagen", tz: 1, lat: 55.67, lon: -12.58 }, { name: "Boras", tz: 1, lat: 57.72, lon: -12.92 }, { name: "G\xF6teborg", tz: 1, lat: 57.72, lon: -11.97 }, { name: "Lund", tz: 1, lat: 55.7, lon: -13.18 }, { name: "Malm\xF6", tz: 1, lat: 55.6, lon: -13 }, { name: "Stockholm", tz: 1, lat: 59.33, lon: -18.05 }, { name: "Oslo", tz: 1, lat: 59.92, lon: -10.75 }, { name: "Trondheim", tz: 1, lat: 63.42, lon: -10.42 }, { name: "Helsinki", tz: 2, lat: 60.17, lon: -24.97 }, { name: "Turku", tz: 2, lat: 60.45, lon: -22.28 }, { name: "Pazardjik", tz: 2, lat: 42.2, lon: -24.33 }, { name: "Plovdiv", tz: 2, lat: 42.15, lon: -24.75 }, { name: "Ruse", tz: 2, lat: 43.83, lon: -25.95 }, { name: "Sofia", tz: 2, lat: 42.68, lon: -23.32 }, { name: "Bacau", tz: 2, lat: 46.57, lon: -26.92 }, { name: "Botosani", tz: 2, lat: 47.75, lon: -26.67 }, { name: "Brasov", tz: 2, lat: 45.65, lon: -25.62 }, { name: "Cluj", tz: 2, lat: 46.78, lon: -23.6 }, { name: "Constanta", tz: 2, lat: 44.18, lon: -28.65 }, { name: "Dorohoi", tz: 2, lat: 47.95, lon: -26.4 }, { name: "Galati", tz: 2, lat: 45.43, lon: -28.05 }, { name: "Iasi", tz: 2, lat: 47.17, lon: -27.58 }, { name: "Oradea", tz: 2, lat: 47.05, lon: -21.95 }, { name: "Piatra Neamt", tz: 2, lat: 46.93, lon: -26.37 }, { name: "Radauti", tz: 2, lat: 47.85, lon: -25.92 }, { name: "Satu Mare", tz: 2, lat: 47.8, lon: -22.88 }, { name: "Sighetul Marmatiei", tz: 2, lat: 47.93, lon: -23.9 }, { name: "Suceava", tz: 2, lat: 47.65, lon: -26.32 }, { name: "Timisoara", tz: 2, lat: 45.75, lon: -21.22 }, { name: "Tirgu Mures", tz: 2, lat: 46.55, lon: -24.55 }, { name: "Budapest", tz: 1, lat: 47.5, lon: -19.08 }, { name: "Sopron", tz: 1, lat: 47.68, lon: -16.6 }, { name: "Br\xFCnn", tz: 1, lat: 49.2, lon: -16.62 }, { name: "Karlsbad", tz: 1, lat: 50.18, lon: -12.87 }, { name: "Liberec", tz: 1, lat: 50.77, lon: -15.05 }, { name: "Olomouc", tz: 1, lat: 49.6, lon: -17.27 }, { name: "Ostrava", tz: 1, lat: 49.83, lon: -18.28 }, { name: "Pilsen", tz: 1, lat: 49.75, lon: -13.38 }, { name: "Prag", tz: 1, lat: 50.08, lon: -14.43 }, { name: "Teplice", tz: 1, lat: 50.65, lon: -13.8 }, { name: "Usti nad Labem", tz: 1, lat: 50.67, lon: -14.03 }, { name: "Bratislava", tz: 1, lat: 48.15, lon: -17.12 }, { name: "Galanta", tz: 1, lat: 48.2, lon: -17.72 }, { name: "Kosice", tz: 1, lat: 48.72, lon: -21.25 }, { name: "Piestany", tz: 1, lat: 48.6, lon: -17.83 }, { name: "Presov", tz: 1, lat: 49, lon: -21.25 }, { name: "Trnava", tz: 1, lat: 48.38, lon: -17.58 }, { name: "Belgrad", tz: 1, lat: 44.83, lon: -20.5 }, { name: "Novi Sad", tz: 1, lat: 45.25, lon: -19.83 }, { name: "Subotica", tz: 1, lat: 46.1, lon: -19.65 }, { name: "Dubrovnik", tz: 1, lat: 42.63, lon: -18.12 }, { name: "Rijeka", tz: 1, lat: 45.33, lon: -14.45 }, { name: "Split", tz: 1, lat: 43.52, lon: -16.45 }, { name: "Zagreb", tz: 1, lat: 45.8, lon: -15.97 }, { name: "Skopje", tz: 1, lat: 41.98, lon: -21.43 }, { name: "Sarajevo", tz: 1, lat: 43.87, lon: -18.42 }, { name: "Ljubljana", tz: 1, lat: 46.05, lon: -14.52 }, { name: "Teheran (GMT+3)", tz: 3, lat: 35.67, lon: -51.43 }, { name: "Teheran (GMT+4)", tz: 4, lat: 35.67, lon: -51.43 }, { name: "Tokyo", tz: 9, lat: 35.7, lon: -139.77 }, { name: "Asuncion", tz: -4, lat: -25.27, lon: 57.67 }, { name: "Sao Paulo", tz: -3, lat: -23.53, lon: 46.62 }, { name: "Buenos Aires", tz: -3, lat: -34.6, lon: 58.45 }, { name: "Guangzhou (Canton)", tz: 8, lat: 23.1, lon: -113.27 }, { name: "Hong Kong", tz: 8, lat: 25.25, lon: -114.17 }, { name: "Peking (Beijing)", tz: 8, lat: 39.9, lon: -116.42 }, { name: "Shanghai", tz: 8, lat: 31.23, lon: -121.47 }, { name: "Shenyang", tz: 8, lat: 41.8, lon: -123.45 }, { name: "Bangkok", tz: 7, lat: 13.58, lon: -100.48 }, { name: "Neu Dehli (GMT+5)", tz: 5, lat: 28.3, lon: -77.47 }, { name: "Neu Dehli (GMT+6)", tz: 6, lat: 28.3, lon: -77.47 }, { name: "Kairo", tz: 2, lat: 29.67, lon: -31.02 }, { name: "Damaskus", tz: 3, lat: 33.13, lon: -36.43 }, { name: "Amman", tz: 2, lat: 31.7, lon: -35.88 }, { name: "Ar-Rijad (Riyadh)", tz: 3, lat: 24.63, lon: -46.72 }, { name: "Beirut", tz: 2, lat: 33.33, lon: -35.37 }, { name: "Pjongjang (P\xB4yongyang)", tz: 9, lat: 39.02, lon: -125.75 }, { name: "Seoul (Soul)", tz: 9, lat: 37.55, lon: -126.97 }, { name: "Singapur", tz: 8, lat: 11.37, lon: -103.8 }, { name: "Lima", tz: -5, lat: -12.05, lon: 77.05 }, { name: "Havana", tz: -5, lat: 23.13, lon: 82.37 }, { name: "Brisbane", tz: 10, lat: -27.47, lon: -153.03 }, { name: "Canberra", tz: 10, lat: -35.28, lon: -149.13 }, { name: "Sydney", tz: 10, lat: -33.87, lon: -151.22 }, { name: "Halifax, N.S., Can.", tz: -4, lat: 44.65, lon: 63.6 }, { name: "Montreal, Quebec, Can.", tz: -5, lat: 45.52, lon: 73.57 }, { name: "Quebec", tz: -5, lat: 46.82, lon: 71.23 }, { name: "Vancouver", tz: -8, lat: 49.27, lon: 123.12 }, { name: "Demmin", tz: 1, lat: 53.9, lon: -13.03 }, { name: "Dieburg", tz: 1, lat: 49.9, lon: -8.83 }, { name: "D\xF6mitz", tz: 1, lat: 53.13, lon: -11.23 }, { name: "Durlach", tz: 1, lat: 49, lon: -8.45 }, { name: "Landau", tz: 1, lat: 49.2, lon: -8.12 }, { name: "Landau an der Isar", tz: 1, lat: 48.67, lon: -12.72 }, { name: "Parchim", tz: 1, lat: 53.42, lon: -11.85 }, { name: "Suhl", tz: 1, lat: 50.62, lon: -10.68 }, { name: "Worms", tz: 1, lat: 49.63, lon: -8.37 }, { name: "Strasbourg", tz: 1, lat: 48.58, lon: -7.75 }, { name: "Kaunas", tz: 2, lat: 54.9, lon: -23.9 }, { name: "K\xF6nigsberg", tz: 2, lat: 54.72, lon: -20.5 }, { name: "Riga", tz: 2, lat: 56.95, lon: -24.1 }, { name: "Tallinn", tz: 2, lat: 59.42, lon: -24.75 }, { name: "Vilnius", tz: 2, lat: 54.68, lon: -25.32 }, { name: "Blackpool", tz: 0, lat: 53.83, lon: 3.05 }, { name: "Bournemouth", tz: 0, lat: 50.72, lon: 1.9 }, { name: "Brighton", tz: 0, lat: 50.83, lon: 0.13 }, { name: "Cambridge", tz: 0, lat: 52.22, lon: -0.13 }, { name: "Coventry", tz: 0, lat: 52.42, lon: 1.5 }, { name: "Croydon", tz: 0, lat: 51.38, lon: 0.1 }, { name: "Eastbourne", tz: 0, lat: 50.77, lon: -0.28 }, { name: "Exeter", tz: 0, lat: 50.72, lon: 3.52 }, { name: "Grimsby", tz: 0, lat: 53.58, lon: 0.08 }, { name: "Guildford", tz: 0, lat: 51.23, lon: 0.58 }, { name: "Harlow", tz: 0, lat: 51.78, lon: -0.13 }, { name: "Harrogate", tz: 0, lat: 54, lon: 1.55 }, { name: "Hemel Hempstead", tz: 0, lat: 51.77, lon: 0.47 }, { name: "Hove", tz: 0, lat: 50.82, lon: 0.17 }, { name: "Leicester", tz: 0, lat: 52.63, lon: 1.08 }, { name: "Luton", tz: 0, lat: 51.88, lon: 0.42 }, { name: "Newcastle", tz: 0, lat: 54.2, lon: 5.75 }, { name: "Norwich", tz: 0, lat: 52.63, lon: -1.3 }, { name: "Nottingham", tz: 0, lat: 52.97, lon: 1.17 }, { name: "Oxford", tz: 0, lat: 51.77, lon: 1.23 }, { name: "Plymouth", tz: 0, lat: 50.38, lon: 4.15 }, { name: "Portsmouth", tz: 0, lat: 50.8, lon: 1.08 }, { name: "Ramsgate", tz: 0, lat: 51.33, lon: -1.42 }, { name: "Reading", tz: 0, lat: 51.47, lon: 0.98 }, { name: "Rochester", tz: 0, lat: 51.4, lon: -0.5 }, { name: "Saint Anne's", tz: 0, lat: 53.75, lon: 3.03 }, { name: "Solihull", tz: 0, lat: 52.42, lon: 1.75 }, { name: "Southend-on-SEA", tz: 0, lat: 51.55, lon: -0.72 }, { name: "Southport", tz: 0, lat: 53.65, lon: 3.02 }, { name: "Watford", tz: 0, lat: 51.67, lon: 0.42 }, { name: "Agen", tz: 1, lat: 44.2, lon: -0.62 }, { name: "Aix-en-Provence", tz: 1, lat: 43.53, lon: -5.43 }, { name: "Aix-les-Bains", tz: 1, lat: 45.7, lon: -5.75 }, { name: "Annecy", tz: 1, lat: 45.9, lon: -6.12 }, { name: "Antibes", tz: 1, lat: 43.58, lon: -7.12 }, { name: "Arcachon", tz: 1, lat: 44.62, lon: 1.2 }, { name: "Bayonne", tz: 1, lat: 43.48, lon: 1.48 }, { name: "Belfort", tz: 1, lat: 47.63, lon: -6.87 }, { name: "Benfeld", tz: 1, lat: 48.37, lon: -7.6 }, { name: "Besancon", tz: 1, lat: 47.25, lon: -6.03 }, { name: "Biarritz", tz: 1, lat: 43.48, lon: 1.57 }, { name: "Bordeuax", tz: 1, lat: 44.83, lon: 0.57 }, { name: "Boulay-Moselle", tz: 1, lat: 49.18, lon: -6.5 }, { name: "Boulogne-Sur-Mer", tz: 1, lat: 50.72, lon: -1.62 }, { name: "Brest, Fr.", tz: 1, lat: 48.4, lon: 4.48 }, { name: "Caen", tz: 1, lat: 49.18, lon: 0.35 }, { name: "Caluire et Cuire", tz: 1, lat: 45.8, lon: -4.85 }, { name: "Cannes", tz: 1, lat: 43.55, lon: -7.02 }, { name: "Carpentras", tz: 1, lat: 44.05, lon: -5.05 }, { name: "Cavaillon", tz: 1, lat: 43.83, lon: -5.02 }, { name: "Chalons-Sur-Marne", tz: 1, lat: 48.95, lon: -4.37 }, { name: "Chalons-Sur-Saone", tz: 1, lat: 46.78, lon: -4.85 }, { name: "Clermont-Ferrand", tz: 1, lat: 45.78, lon: -3.08 }, { name: "Colmar", tz: 1, lat: 58.08, lon: -7.37 }, { name: "Dijon", tz: 1, lat: 47.32, lon: -5.02 }, { name: "Evian-Les-Bains", tz: 1, lat: 46.38, lon: -6.58 }, { name: "Grasse", tz: 1, lat: 43.67, lon: -6.92 }, { name: "Grenoble", tz: 1, lat: 45.17, lon: -5.72 }, { name: "Haguenau", tz: 1, lat: 48.82, lon: -7.78 }, { name: "La Rochelle", tz: 1, lat: 46.17, lon: 1.17 }, { name: "La Seyne-Sur-Mer", tz: 1, lat: 43.1, lon: -5.88 }, { name: "Le Havre", tz: 1, lat: 49.5, lon: -0.13 }, { name: "Lille", tz: 1, lat: 50.63, lon: -3.07 }, { name: "Limoges", tz: 1, lat: 45.83, lon: -1.25 }, { name: "Lyon", tz: 1, lat: 45.75, lon: -4.85 }, { name: "M\xE2con, Fr.", tz: 1, lat: 46.3, lon: -4.83 }, { name: "Menton", tz: 1, lat: 43.78, lon: -7.5 }, { name: "Metz", tz: 1, lat: 49.13, lon: -6.17 }, { name: "Montpellier", tz: 1, lat: 43.6, lon: -3.88 }, { name: "M\xFClhausen im T\xE4le", tz: 1, lat: 48.57, lon: -9.65 }, { name: "Nancy", tz: 1, lat: 48.68, lon: -6.2 }, { name: "N\xEEmes", tz: 1, lat: 43.83, lon: -4.35 }, { name: "Nizza Monferrato", tz: 1, lat: 44.77, lon: -8.35 }, { name: "Orl\xE9ans, Fr.", tz: 1, lat: 47.92, lon: -1.9 }, { name: "Perpignan", tz: 1, lat: 42.68, lon: -2.87 }, { name: "Reims", tz: 1, lat: 49.25, lon: -4.02 }, { name: "Rouen", tz: 1, lat: 49.43, lon: -1.08 }, { name: "Saint-Louis, Fr.", tz: 1, lat: 47.58, lon: -7.57 }, { name: "Sens", tz: 1, lat: 48.2, lon: -3.28 }, { name: "Toulouse", tz: 1, lat: 43.6, lon: -1.43 }, { name: "Tours", tz: 1, lat: 47.38, lon: -0.68 }, { name: "Troyes", tz: 1, lat: 48.3, lon: -4.08 }, { name: "Versailles, Fr.", tz: 1, lat: 48.8, lon: -2.13 }, { name: "Vittel", tz: 1, lat: 48.2, lon: -5.95 }, { name: "Wasselonne", tz: 1, lat: 48.63, lon: -7.45 }, { name: "Rothenburg ob der Tauber", tz: 1, lat: 49.38, lon: -10.17 }, { name: "Rothenburg", tz: 1, lat: 51.33, lon: -14.97 }, { name: "Rothenburg an der Oder", tz: 1, lat: 52.02, lon: -15.42 }, { name: "Alexandria, Egypt", tz: 2, lat: 31.18, lon: -29.93 }, { name: "Anchorage, AK", tz: -9, lat: 61.22, lon: 149.88 }, { name: "Ann Arbor, MI", tz: -5, lat: 42.3, lon: 83.75 }, { name: "Augusta, GA", tz: -5, lat: 33.48, lon: 81.93 }, { name: "Baghdad, Iraq", tz: 3, lat: 33.35, lon: -44.42 }, { name: "Birmingham, AL", tz: -6, lat: 33.52, lon: 86.82 }, { name: "Bombay, India (GMT+5)", tz: 5, lat: 18.95, lon: -72.83 }, { name: "Bombay, India (GMT+6)", tz: 6, lat: 18.95, lon: -72.83 }, { name: "Casablanca, Marokko", tz: 0, lat: 33.65, lon: 7.58 }, { name: "Djakarta, Indonesia", tz: 7, lat: -6.17, lon: -106.8 }, { name: "Desmoines, IA", tz: -6, lat: 41.58, lon: 93.62 }, { name: "Dubayy", tz: 4, lat: 25.3, lon: -55.3 }, { name: "Fort Lauderdale, FL", tz: -5, lat: 26.12, lon: 80.13 }, { name: "Jacksonsville, FL", tz: -5, lat: 30.33, lon: 81.67 }, { name: "Karachi", tz: 5, lat: 24.87, lon: -67.05 }, { name: "Kuala Lumpur, Malaysia", tz: 8, lat: 3.15, lon: -101.72 }, { name: "Kuwait, Kuwait", tz: 3, lat: 29.5, lon: -47.75 }, { name: "Lagos, Nigeria", tz: 1, lat: 6.45, lon: -3.4 }, { name: "Las Vegas, NV", tz: -8, lat: 36.18, lon: 115.13 }, { name: "Mauritius", tz: 4, lat: -20.28, lon: -57.55 }, { name: "Panama, Panama", tz: -5, lat: 8.97, lon: 79.52 }, { name: "Peoria, IL", tz: -6, lat: 40.7, lon: 89.6 }, { name: "Raleigh, NC", tz: -5, lat: 35.78, lon: 78.65 }, { name: "Redmond, WA", tz: -8, lat: 47.4, lon: 122.07 }, { name: "Sacramento, CA", tz: -8, lat: 38.58, lon: 121.5 }, { name: "Tenerife, Spain", tz: 1, lat: 28.03, lon: -16.57 }, { name: "Durres, Albania", tz: 1, lat: 41.32, lon: -19.43 }, { name: "Lushnje, Albania", tz: 1, lat: 40.93, lon: -19.7 }, { name: "Lugoj, Romania", tz: 2, lat: 45.68, lon: -21.9 }, { name: "Shkoder, Albania", tz: 1, lat: 42.08, lon: -19.5 }, { name: "Addis Abeba", tz: 3, lat: 9.15, lon: -38.77 }, { name: "Aden, Jemen", tz: 3, lat: 12.78, lon: -45.03 }, { name: "Boca Raton, FL", tz: -5, lat: 26.35, lon: 80.08 }, { name: "Buchara", tz: 5, lat: 39.77, lon: -64.42 }, { name: "Gondar, Ethiopia", tz: 3, lat: 12.6, lon: -37.48 }, { name: "Jekaterinburg", tz: 5, lat: 56.83, lon: -60.5 }, { name: "Kaifeng, China", tz: 8, lat: 34.78, lon: -114.43 }, { name: "Krasnojarsk", tz: 7, lat: 56, lon: -92.98 }, { name: "Mbale, Uganda", tz: 3, lat: 1.07, lon: -34.18 }, { name: "New Bedfort, MA", tz: -5, lat: 41.63, lon: 70.93 }, { name: "Nicosia, Cyprus", tz: 2, lat: 34.78, lon: -33.48 }, { name: "Nowgorod", tz: 3, lat: 58.58, lon: -31.23 }, { name: "Omsk", tz: 6, lat: 54.95, lon: -73.33 }, { name: "Plano, TX", tz: -6, lat: 33.03, lon: 96.7 }, { name: "Perm", tz: 5, lat: 57.92, lon: -56.05 }, { name: "Sana, Jemen", tz: 3, lat: 15.18, lon: -44.02 }, { name: "Skokie, IL", tz: -6, lat: 42.03, lon: 87.77 }, { name: "Woronesch, Russia", tz: 3, lat: 51.7, lon: -39.25 }, { name: "Allentown, PA", tz: -5, lat: 40.6, lon: 75.48 }, { name: "Capetown, South Africa", tz: 2, lat: -33.9, lon: -18.37 }, { name: "Chapel Hill, NC", tz: -5, lat: 35.9, lon: 79.07 }, { name: "Ft. Walton Beach, FL", tz: -5, lat: 30.4, lon: 86.52 }, { name: "Greenwich Meridian", tz: 0, lat: 0, lon: 0 }, { name: "Monsey, NY", tz: -5, lat: 41.12, lon: 74.07 }, { name: "Ramat Gan", tz: 2, lat: 32.07, lon: -34.82 }, { name: "Lugano", tz: 1, lat: 46.02, lon: -8.97 }, { name: "Baden, Austria", tz: 1, lat: 48, lon: -16.23 }, { name: "Gadsten, AL", tz: -6, lat: 34.02, lon: 86.02 }, { name: "Huntsville, AL", tz: -6, lat: 34.73, lon: 86.58 }, { name: "Montgomery, AL", tz: -6, lat: 32.37, lon: 86.32 }, { name: "Juneau, AK", tz: -10, lat: 58.3, lon: 134.42 }, { name: "Nome, AK", tz: -10, lat: 64.5, lon: 165.42 }, { name: "Algiers", tz: 1, lat: 36.48, lon: -3 }, { name: "Luanda", tz: 1, lat: -8.5, lon: -13.15 }, { name: "Yuma, Arizona", tz: -7, lat: 32.72, lon: 114.62 }, { name: "Ft Smith, Arkansas", tz: -6, lat: 35.37, lon: 94.43 }, { name: "Perth", tz: 8, lat: -31.83, lon: -116.17 }, { name: "Porto Novo", tz: 1, lat: 6.3, lon: -2.45 }, { name: "Ouagadougou", tz: 0, lat: 12.2, lon: 1.4 }, { name: "Bujumbura", tz: 2, lat: -3.22, lon: -29.18 }, { name: "Bakersfield, CA", tz: -8, lat: 35.37, lon: 119.02 }, { name: "Berkeley, CA", tz: -8, lat: 37.87, lon: 122.27 }, { name: "Eureka, CA", tz: -8, lat: 40.78, lon: 124.17 }, { name: "Fresno, CA", tz: -8, lat: 36.73, lon: 119.78 }, { name: "Long Beach, CA", tz: -8, lat: 33.77, lon: 118.18 }, { name: "Oakland, CA", tz: -8, lat: 37.78, lon: 122.27 }, { name: "Pasadena, CA", tz: -8, lat: 34.15, lon: 118.15 }, { name: "San Bernardino, CA", tz: -8, lat: 34.12, lon: 117.47 }, { name: "San Jose, CA", tz: -8, lat: 37.33, lon: 121.88 }, { name: "Santa Barbara, CA", tz: -8, lat: 34.42, lon: 119.7 }, { name: "Santa Cruz, CA", tz: -8, lat: 36.97, lon: 122.02 }, { name: "Stockton, CA", tz: -8, lat: 37.97, lon: 121.28 }, { name: "Yaounde", tz: 1, lat: 3.52, lon: -11.32 }, { name: "Calgary", tz: -7, lat: 51.05, lon: 114.05 }, { name: "Edmondton", tz: -7, lat: 53.55, lon: 113.48 }, { name: "Lethbridge", tz: -7, lat: 49.7, lon: 112.83 }, { name: "Prince Rupert, British Columbia", tz: -8, lat: 54.32, lon: 130.32 }, { name: "Victoria, British Columbia", tz: -8, lat: 48.43, lon: 123.37 }, { name: "Brandon", tz: -6, lat: 49.85, lon: 99.95 }, { name: "Churchill", tz: -6, lat: 58.75, lon: 94.17 }, { name: "Fredericton", tz: -4, lat: 45.97, lon: 66.65 }, { name: "Moncton", tz: -4, lat: 46.08, lon: 64.78 }, { name: "St John", tz: -4, lat: 45.27, lon: 66.07 }, { name: "St John's", tz: -4, lat: 47.57, lon: 52.72 }, { name: "Yellowknife", tz: -7, lat: 62.45, lon: 114.38 }, { name: "Sydney, Canada", tz: -4, lat: 46.13, lon: 60.2 }, { name: "Belleville", tz: -5, lat: 44.17, lon: 77.38 }, { name: "Brantford", tz: -5, lat: 43.15, lon: 80.27 }, { name: "Burlington", tz: -5, lat: 43.33, lon: 79.8 }, { name: "Guelph", tz: -5, lat: 43.55, lon: 80.25 }, { name: "Hamilton", tz: -5, lat: 43.25, lon: 79.88 }, { name: "Kingston", tz: -5, lat: 44.23, lon: 76.48 }, { name: "Kitchener", tz: -5, lat: 43.45, lon: 80.48 }, { name: "London, Ontario", tz: -5, lat: 42.98, lon: 81.23 }, { name: "Mississauga", tz: -5, lat: 43.55, lon: 79.57 }, { name: "North Bay", tz: -5, lat: 46.32, lon: 79.47 }, { name: "Oshawa", tz: -5, lat: 43.9, lon: 78.87 }, { name: "Peterborough", tz: -5, lat: 44.32, lon: 78.32 }, { name: "St Catherines", tz: -5, lat: 43.17, lon: 79.25 }, { name: "Sault St Marie", tz: -5, lat: 46.5, lon: 84.33 }, { name: "Sudbury", tz: -5, lat: 46.48, lon: 80.98 }, { name: "Thunder Bay", tz: -5, lat: 48.38, lon: 89.25 }, { name: "Windsor", tz: -5, lat: 42.32, lon: 83.03 }, { name: "Hull", tz: -5, lat: 45.43, lon: 75.72 }, { name: "La Salle", tz: -5, lat: 45.43, lon: 73.67 }, { name: "Laval", tz: -5, lat: 45.22, lon: 73.75 }, { name: "Sherbrooke", tz: -5, lat: 45.4, lon: 71.85 }, { name: "Trois Riveres", tz: -5, lat: 46.35, lon: 72.55 }, { name: "Dawson", tz: -8, lat: 64.07, lon: 139.43 }, { name: "Whitehorse", tz: -8, lat: 60.72, lon: 135.05 }, { name: "Moose Jaw", tz: -6, lat: 50.4, lon: 105.53 }, { name: "Regina", tz: -6, lat: 50.45, lon: 104.62 }, { name: "Saskatoon", tz: -6, lat: 52.13, lon: 106.67 }, { name: "Bangui", tz: 1, lat: 4.22, lon: -18.37 }, { name: "N'Djamena", tz: 1, lat: 12.1, lon: -14.58 }, { name: "Grand Junction", tz: -7, lat: 39.07, lon: 108.57 }, { name: "Pueblo", tz: -7, lat: 38.25, lon: 104.62 }, { name: "Brazzaville", tz: 1, lat: -4.13, lon: -15.13 }, { name: "Bridgeport", tz: -5, lat: 41.18, lon: 73.18 }, { name: "Abidjan", tz: 0, lat: 5.18, lon: 4.02 }, { name: "Wilmington, Delaware", tz: -5, lat: 39.75, lon: 75.55 }, { name: "Quito", tz: -5, lat: -0.28, lon: 78.52 }, { name: "Daytona Beach, FL", tz: -5, lat: 29.22, lon: 81.02 }, { name: "Gainesville, FL", tz: -5, lat: 29.65, lon: 82.32 }, { name: "Key West, FL", tz: -5, lat: 24.57, lon: 81.8 }, { name: "Pensacola, FL", tz: -5, lat: 30.42, lon: 87.22 }, { name: "St. Petersburg, FL", tz: -5, lat: 27.78, lon: 82.63 }, { name: "Sarasota, FL", tz: -5, lat: 27.33, lon: 82.55 }, { name: "Tallahassee, FL", tz: -5, lat: 30.45, lon: 84.45 }, { name: "W. Palm Beach, FL", tz: -5, lat: 26.72, lon: 80.05 }, { name: "Libreville", tz: 1, lat: 0.23, lon: -9.25 }, { name: "Banjul", tz: 0, lat: 13.28, lon: 16.38 }, { name: "Augusta, Georgia", tz: -5, lat: 33.47, lon: 81.97 }, { name: "Columbus, Georgia", tz: -5, lat: 32.47, lon: 84.98 }, { name: "Macon, Georgia", tz: -5, lat: 32.83, lon: 83.63 }, { name: "Savannah, Georgia", tz: -5, lat: 32.07, lon: 81.1 }, { name: "Accra", tz: 0, lat: 5.33, lon: 0.15 }, { name: "Conakry", tz: 0, lat: 9.32, lon: -13.17 }, { name: "Hilo", tz: 10, lat: 19.73, lon: 155.08 }, { name: "Lihue", tz: 10, lat: 21.98, lon: 159.37 }, { name: "Victoria, Hongkong", tz: 8, lat: 22.17, lon: -114.3 }, { name: "Reykjavik", tz: 0, lat: 64.15, lon: 21.65 }, { name: "Boise, Idaho", tz: -7, lat: 43.62, lon: 116.2 }, { name: "Pocatello, Idaho", tz: -7, lat: 42.87, lon: 112.45 }, { name: "Bloomington, IL", tz: -6, lat: 40.48, lon: 89 }, { name: "Champaign, IL", tz: -6, lat: 40.12, lon: 88.25 }, { name: "Decatur, IL", tz: -6, lat: 39.85, lon: 88.95 }, { name: "Moline, IL", tz: -6, lat: 41.52, lon: 90.52 }, { name: "Rockford, IL", tz: -6, lat: 42.27, lon: 89.1 }, { name: "Springfield, IL", tz: -6, lat: 39.78, lon: 89.65 }, { name: "Urbana, IL", tz: -6, lat: 40.12, lon: 88.2 }, { name: "Evansville, Indiana", tz: -6, lat: 37.97, lon: 87.57 }, { name: "Ft. Wayne, Indiana", tz: -6, lat: 41.07, lon: 85.13 }, { name: "Gary, Indiana", tz: -6, lat: 41.62, lon: 87.33 }, { name: "Lafayette, Indiana", tz: -6, lat: 40.42, lon: 86.9 }, { name: "Muncie, Indiana", tz: -6, lat: 40.18, lon: 85.38 }, { name: "South Bend, Indiana", tz: -6, lat: 41.68, lon: 86.25 }, { name: "Terre Houte, Indiana", tz: -6, lat: 39.47, lon: 87.4 }, { name: "Cedar Rapids, IA", tz: -6, lat: 41.97, lon: 91.67 }, { name: "Davenport, IA", tz: -6, lat: 41.52, lon: 90.58 }, { name: "Dubuque, IA", tz: -6, lat: 42.5, lon: 90.67 }, { name: "Iowa City, IA", tz: -6, lat: 41.67, lon: 91.53 }, { name: "Sioux City, IA", tz: -6, lat: 42.5, lon: 96.42 }, { name: "Waterloo, IA", tz: -6, lat: 42.5, lon: 92.33 }, { name: "Dodge City (Kans., US)", tz: -6, lat: 37.75, lon: 100.02 }, { name: "Salina (Kans., US)", tz: -6, lat: 38.85, lon: 97.62 }, { name: "Wichita (Kans., US)", tz: -6, lat: 37.7, lon: 97.33 }, { name: "Ashland, KY", tz: -5, lat: 38.48, lon: 82.63 }, { name: "Bowling Green, KY", tz: -5, lat: 37, lon: 86.45 }, { name: "Lexington, KY", tz: -5, lat: 38.05, lon: 84.5 }, { name: "Paducah, KY", tz: -5, lat: 37.07, lon: 88.6 }, { name: "Maseru", tz: 2, lat: -29.18, lon: -27.28 }, { name: "Monrovia", tz: 0, lat: 6.2, lon: 10.47 }, { name: "Tripoli", tz: 1, lat: 32.83, lon: -13.22 }, { name: "Baton Rouge, Louisiana", tz: -6, lat: 30.45, lon: 91.18 }, { name: "Shreveport, Louisiana", tz: -6, lat: 32.52, lon: 93.75 }, { name: "Antananarivo", tz: 3, lat: -18.5, lon: -47.3 }, { name: "Augusta, Maine", tz: -5, lat: 44.32, lon: 69.75 }, { name: "Bangor, Maine", tz: -5, lat: 44.8, lon: 68.75 }, { name: "Lilongwe", tz: 2, lat: -13.58, lon: -33.48 }, { name: "Bamako", tz: 0, lat: 12.4, lon: 7.58 }, { name: "Brockton, MA", tz: -5, lat: 42.08, lon: 71.02 }, { name: "Cambridge, MA", tz: -5, lat: 42.37, lon: 71.1 }, { name: "Fall River, MA", tz: -5, lat: 41.7, lon: 71.15 }, { name: "Holyoke, MA", tz: -5, lat: 42.2, lon: 72.62 }, { name: "Lawrence, MA", tz: -5, lat: 42.7, lon: 71.15 }, { name: "Lowell, MA", tz: -5, lat: 42.63, lon: 71.32 }, { name: "Pittsfield, MA", tz: -5, lat: 42.45, lon: 73.25 }, { name: "Somerville, MA", tz: -5, lat: 42.38, lon: 71.1 }, { name: "Worcester, MA", tz: -5, lat: 42.27, lon: 71.8 }, { name: "Nouakchott", tz: 0, lat: 18.08, lon: 15.58 }, { name: "Battle Creek, MI", tz: -5, lat: 42.32, lon: 85.18 }, { name: "Bay City, MI", tz: -5, lat: 43.6, lon: 83.88 }, { name: "Flint, MI", tz: -5, lat: 43.02, lon: 83.7 }, { name: "Grand Rapids, MI", tz: -5, lat: 42.97, lon: 85.67 }, { name: "Jackson, MI", tz: -5, lat: 42.25, lon: 84.4 }, { name: "Kalamazoo, MI", tz: -5, lat: 42.28, lon: 85.58 }, { name: "Lansing, MI", tz: -5, lat: 42.73, lon: 84.55 }, { name: "Saginaw, MI", tz: -5, lat: 43.43, lon: 83.93 }, { name: "Duluth, Minnesota", tz: -6, lat: 46.78, lon: 92.1 }, { name: "Rochester, Minnesota", tz: -6, lat: 44.02, lon: 92.47 }, { name: "St. Cloud, Minnesota", tz: -6, lat: 45.57, lon: 94.17 }, { name: "St. Paul, Minnesota", tz: -6, lat: 44.95, lon: 93.1 }, { name: "Biloxi, Mississippi", tz: -6, lat: 30.4, lon: 88.88 }, { name: "Gulfport, Mississippi", tz: -6, lat: 30.37, lon: 89.1 }, { name: "Jackson, Mississippi", tz: -6, lat: 32.3, lon: 90.18 }, { name: "Natchez, Mississippi", tz: -6, lat: 31.57, lon: 91.38 }, { name: "Columbia, Missouri", tz: -6, lat: 38.95, lon: 92.33 }, { name: "Joplin, Missouri", tz: -6, lat: 37.07, lon: 94.5 }, { name: "Kansas City, Missouri", tz: -6, lat: 39.07, lon: 94.58 }, { name: "St. Joseph, Missouri", tz: -6, lat: 39.77, lon: 94.85 }, { name: "St. Louis, Missouri", tz: -6, lat: 38.63, lon: 90.2 }, { name: "Springfield, Missouri", tz: -6, lat: 37.22, lon: 93.3 }, { name: "Billings, Montana", tz: -7, lat: 45.78, lon: 108.5 }, { name: "Butte, Montana", tz: -7, lat: 46.02, lon: 112.53 }, { name: "Great Falls, Montana", tz: -7, lat: 47.5, lon: 111.3 }, { name: "Helena, Montana", tz: -7, lat: 46.6, lon: 112.03 }, { name: "Rabat", tz: 1, lat: 34.02, lon: 6.52 }, { name: "Maputo", tz: 2, lat: -25.58, lon: -32.35 }, { name: "Windhoek", tz: 2, lat: -22.33, lon: -17.07 }, { name: "Lincoln, Nebraska", tz: -6, lat: 40.82, lon: 96.7 }, { name: "Carson City, NV", tz: -8, lat: 39.17, lon: 119.77 }, { name: "Reno, NV", tz: -8, lat: 39.52, lon: 119.82 }, { name: "Concord, New Hampshire", tz: -5, lat: 43.2, lon: 71.52 }, { name: "Manchester, New Hampshire", tz: -5, lat: 42.98, lon: 71.47 }, { name: "Portsmouth, New Hampshire", tz: -5, lat: 43.07, lon: 70.75 }, { name: "Atlantic City, NJ", tz: -5, lat: 39.37, lon: 74.43 }, { name: "Camdon, NJ", tz: -5, lat: 39.95, lon: 75.1 }, { name: "Jersey City, NJ", tz: -5, lat: 40.73, lon: 74.07 }, { name: "Paterson, NJ", tz: -5, lat: 40.9, lon: 74.15 }, { name: "Trenton, NJ", tz: -5, lat: 40.22, lon: 74.8 }, { name: "Albuquerque, NM", tz: -7, lat: 35.07, lon: 106.65 }, { name: "Gallup, NM", tz: -7, lat: 35.52, lon: 108.73 }, { name: "Santa Fe, NM", tz: -7, lat: 35.67, lon: 105.93 }, { name: "Albany, NY", tz: -5, lat: 42.65, lon: 73.75 }, { name: "Binghamton, NY", tz: -5, lat: 42.1, lon: 86.82 }, { name: "Buffalo, NY", tz: -5, lat: 42.88, lon: 78.87 }, { name: "Central Islip, NY", tz: -5, lat: 40.78, lon: 73.2 }, { name: "Niagra Falls, NY", tz: -5, lat: 43.1, lon: 79.05 }, { name: "Rochester, NY", tz: -5, lat: 43.17, lon: 77.6 }, { name: "Schenectady, NY", tz: -5, lat: 42.82, lon: 73.93 }, { name: "Syracuse, NY", tz: -5, lat: 43.05, lon: 76.15 }, { name: "Troy, NY", tz: -5, lat: 42.73, lon: 73.68 }, { name: "Utica, NY", tz: -5, lat: 43.1, lon: 75.23 }, { name: "White Plains, NY", tz: -5, lat: 41.03, lon: 73.75 }, { name: "Yonkers, NY", tz: -5, lat: 40.93, lon: 73.9 }, { name: "Auckland", tz: 12, lat: -36.88, lon: -174.75 }, { name: "Niamey", tz: 1, lat: 13.32, lon: -2.03 }, { name: "Lagos", tz: 1, lat: 6.27, lon: -3.28 }, { name: "Ashlville, NC", tz: -5, lat: 35.6, lon: 82.55 }, { name: "Durham, NC", tz: -5, lat: 36, lon: 78.92 }, { name: "Greensboro, NC", tz: -5, lat: 36.07, lon: 79.78 }, { name: "Wilmington, NC", tz: -5, lat: 34.23, lon: 77.93 }, { name: "Winston Salem, NC", tz: -5, lat: 36.1, lon: 80.25 }, { name: "Bismark, N. Dakota", tz: -7, lat: 46.8, lon: 100.78 }, { name: "Fargo, N. Dakota", tz: -7, lat: 46.88, lon: 96.78 }, { name: "Minot, N. Dakota", tz: -7, lat: 48.23, lon: 101.3 }, { name: "Akron, OH", tz: -5, lat: 41.08, lon: 81.52 }, { name: "Dayton, OH", tz: -5, lat: 39.77, lon: 84.2 }, { name: "Hamilton, OH", tz: -5, lat: 39.4, lon: 84.57 }, { name: "Lima, OH", tz: -5, lat: 40.75, lon: 84.1 }, { name: "Lorain, OH", tz: -5, lat: 41.47, lon: 82.18 }, { name: "Springfield, OH", tz: -5, lat: 39.95, lon: 83.8 }, { name: "Stuebenville, OH", tz: -5, lat: 40.37, lon: 80.62 }, { name: "Toledo, OH", tz: -5, lat: 41.65, lon: 83.55 }, { name: "Youngstown, OH", tz: -5, lat: 41.1, lon: 80.65 }, { name: "Zanesville, OH", tz: -5, lat: 39.93, lon: 82.52 }, { name: "Enid, Oklahoma", tz: -6, lat: 36.4, lon: 97.88 }, { name: "Oklahoma City", tz: -6, lat: 35.47, lon: 97.52 }, { name: "Tulsa, Oklahoma", tz: -6, lat: 36.15, lon: 96 }, { name: "Eugene (Oreg, US)", tz: -8, lat: 44.05, lon: 123.1 }, { name: "Salem (Oreg, US)", tz: -8, lat: 44.93, lon: 123.03 }, { name: "Altonna, Pennsylvania", tz: -5, lat: 40.52, lon: 78.38 }, { name: "Bethlehem, Pennsylvania", tz: -5, lat: 40.6, lon: 75.38 }, { name: "Erie, Pennsylvania", tz: -5, lat: 42.12, lon: 80.08 }, { name: "Harrisburg, Pennsylvania", tz: -5, lat: 40.25, lon: 76.88 }, { name: "Johnstown, Pennsylvania", tz: -5, lat: 40.33, lon: 78.92 }, { name: "Lancaster, Pennsylvania", tz: -5, lat: 40.03, lon: 76.3 }, { name: "Reading, Pennsylvania", tz: -5, lat: 40.33, lon: 75.93 }, { name: "Scranton, Pennsylvania", tz: -5, lat: 41.42, lon: 75.67 }, { name: "WilkesEBarre, Pennsylvania", tz: -5, lat: 41.25, lon: 75.88 }, { name: "York, Pennsylvania", tz: -5, lat: 39.97, lon: 76.73 }, { name: "Manila", tz: 8, lat: 14.62, lon: -121 }, { name: "Kigali", tz: 2, lat: -1.57, lon: -3.03 }, { name: "Dakar", tz: 0, lat: 14.38, lon: 17.27 }, { name: "Mogadishu", tz: 3, lat: 2, lon: -45.22 }, { name: "Columbia, SC", tz: -5, lat: 34, lon: 81.03 }, { name: "Greenville, SC", tz: -5, lat: 34.85, lon: 82.4 }, { name: "Spartanburg, SC", tz: -5, lat: 34.95, lon: 81.93 }, { name: "Pierre, South Dakota", tz: -6, lat: 44.37, lon: 100.35 }, { name: "Rapid City, South Dakota", tz: -6, lat: 44.08, lon: 103.22 }, { name: "Sioux Falls, South Dakota", tz: -6, lat: 43.55, lon: 96.73 }, { name: "Khartoum", tz: 2, lat: 15.33, lon: -32.22 }, { name: "Daressalam", tz: 3, lat: -6.52, lon: -39.18 }, { name: "Chattanooga (Tenn., US)", tz: -6, lat: 35.05, lon: 85.32 }, { name: "Knoxville (Tenn., US)", tz: -6, lat: 35.97, lon: 83.92 }, { name: "Abilene, TX", tz: -6, lat: 32.45, lon: 99.73 }, { name: "Amarillo, TX", tz: -6, lat: 35.18, lon: 101.83 }, { name: "Austin, TX", tz: -6, lat: 30.27, lon: 97.75 }, { name: "Beaumont, TX", tz: -6, lat: 30.08, lon: 94.1 }, { name: "Brownsville, TX", tz: -6, lat: 25.9, lon: 97.5 }, { name: "Corpus Christi, TX", tz: -6, lat: 27.8, lon: 97.4 }, { name: "El Paso, TX", tz: -6, lat: 31.77, lon: 106.48 }, { name: "Ft Worth, TX", tz: -6, lat: 32.75, lon: 97.33 }, { name: "Galveston, TX", tz: -6, lat: 29.3, lon: 94.8 }, { name: "Laredo, TX", tz: -6, lat: 27.5, lon: 99.52 }, { name: "Lubbock, TX", tz: -6, lat: 33.58, lon: 101.85 }, { name: "Marshall, TX", tz: -6, lat: 32.55, lon: 94.38 }, { name: "Port Arthur, TX", tz: -6, lat: 29.88, lon: 93.93 }, { name: "San Angelo, TX", tz: -6, lat: 31.47, lon: 100.43 }, { name: "Texarkana, TX", tz: -6, lat: 33.43, lon: 94.05 }, { name: "Waco, TX", tz: -6, lat: 31.55, lon: 97.13 }, { name: "Lhasa", tz: 8, lat: 29.68, lon: -92.2 }, { name: "Lome", tz: 0, lat: 6.1, lon: -1.2 }, { name: "Tunis", tz: 1, lat: 36.48, lon: -10.13 }, { name: "Kampala", tz: 3, lat: 0.2, lon: -32.35 }, { name: "Logan, Utah", tz: -7, lat: 41.73, lon: 111.83 }, { name: "Ogden, Utah", tz: -7, lat: 41.23, lon: 111.97 }, { name: "Provo, Utah", tz: -7, lat: 40.23, lon: 111.65 }, { name: "Brattleboro, VT", tz: -5, lat: 42.85, lon: 72.57 }, { name: "Montpelier, VT", tz: -5, lat: 44.27, lon: 72.55 }, { name: "Hanoi", tz: 7, lat: 21.07, lon: -105.83 }, { name: "Norfolk, Virginia", tz: -5, lat: 36.85, lon: 76.28 }, { name: "Portsmouth, Virginia", tz: -5, lat: 36.83, lon: 76.28 }, { name: "Richmond, Virginia", tz: -5, lat: 37.53, lon: 77.43 }, { name: "Roanooke, Virginia", tz: -5, lat: 37.25, lon: 79.93 }, { name: "Bellingham, WA", tz: -8, lat: 48.77, lon: 122.48 }, { name: "Spokane, WA", tz: -8, lat: 47.67, lon: 117.43 }, { name: "Tacoma, WA", tz: -8, lat: 47.25, lon: 122.43 }, { name: "Walla Walla, WA", tz: -8, lat: 46.07, lon: 118.33 }, { name: "Yakima, WA", tz: -8, lat: 46.6, lon: 120.52 }, { name: "Laayoune", tz: 1, lat: 27.1, lon: 13.12 }, { name: "Charleston, West Virginia", tz: -5, lat: 38.35, lon: 81.63 }, { name: "Huntington, West Virginia", tz: -5, lat: 38.42, lon: 82.45 }, { name: "Wheeling, West Virginia", tz: -5, lat: 40.07, lon: 80.72 }, { name: "Eau Claire (Wis., US)", tz: -6, lat: 44.82, lon: 91.5 }, { name: "Green Bay (Wis., US)", tz: -6, lat: 44.52, lon: 88.02 }, { name: "Kenosha (Wis., US)", tz: -6, lat: 42.6, lon: 87.83 }, { name: "Racine (Wis., US)", tz: -6, lat: 42.73, lon: 87.78 }, { name: "Sheboygan (Wis., US)", tz: -6, lat: 43.75, lon: 87.72 }, { name: "Superior (Wis., US)", tz: -6, lat: 46.72, lon: 92.1 }, { name: "Cheyenne, Wyoming", tz: -7, lat: 41.13, lon: 104.82 }, { name: "Sheridan, Wyoming", tz: -7, lat: 44.8, lon: 106.95 }, { name: "Lusaka", tz: 2, lat: -15.28, lon: -28.17 }, { name: "Kinshasa", tz: 1, lat: -4.18, lon: -15.18 }, { name: "Harare", tz: 2, lat: -17.5, lon: -31.03 }, { name: "Abu Dhabi", tz: 4, lat: 24.33, lon: -54.57 }, { name: "Acapulco", tz: -6, lat: 17.08, lon: 100.13 }, { name: "Agana, Guam", tz: 10, lat: 13.48, lon: -144.73 }, { name: "Al-Manamah, Bharain", tz: 3, lat: 26.22, lon: -50.55 }, { name: "Andorra, Spain", tz: 1, lat: 40.97, lon: 0.47 }, { name: "Asmara, Eritrea", tz: 3, lat: 15.02, lon: -38.48 }, { name: "Baku, Aserbaidschan", tz: 4, lat: 40.35, lon: -49.82 }, { name: "Bergen, The Netherlands", tz: 1, lat: 51.62, lon: -6.07 }, { name: "Bischkek, Kirgistan", tz: 6, lat: 43.02, lon: -74.97 }, { name: "Bridgetown (Barbados)", tz: -4, lat: 13.08, lon: 59.47 }, { name: "Brno", tz: 1, lat: 49.2, lon: -16.58 }, { name: "Broken Hill, Australia", tz: 10, lat: -31.87, lon: -141.17 }, { name: "Bukavu, Zaire", tz: 2, lat: -2.55, lon: -28.65 }, { name: "Kanarische Inseln", tz: 0, lat: 28.47, lon: 15.05 }, { name: "Cayenne (French - Guyana)", tz: -3, lat: 4.78, lon: -52.47 }, { name: "Cebu, Phillipines", tz: 8, lat: 10.18, lon: -123.75 }, { name: "Cordoba, Spain", tz: 1, lat: 57.87, lon: 4.83 }, { name: "Cordoba, Argentinia", tz: -3, lat: -31.15, lon: 64.25 }, { name: "Cordova, Alaska, U.S.A.", tz: -9, lat: 60.55, lon: 145.73 }, { name: "Dalian, China", tz: 8, lat: 38.9, lon: -121.65 }, { name: "Dakar, Senegal", tz: 0, lat: 14.78, lon: 16.95 }, { name: "Dhaka, Bangladesh", tz: 6, lat: 23.48, lon: -90.4 }, { name: "Durban, South Africa", tz: 2, lat: -29.87, lon: -30.9 }, { name: "Dushanbe, Tadschikistan", tz: 6, lat: 38.6, lon: -69.1 }, { name: "Er Riad", tz: 3, lat: 24.65, lon: -46.7 }, { name: "Firenze, Italy", tz: 1, lat: 43.77, lon: -11.23 }, { name: "Freetown, Sierra Leone", tz: 0, lat: 8.5, lon: 13.22 }, { name: "Georgetown, Gambia", tz: 0, lat: 13.22, lon: 14.75 }, { name: "Guatemala City", tz: -6, lat: 14.58, lon: 90.67 }, { name: "Hermosillo, Mexico", tz: -6, lat: 29.18, lon: 110.98 }, { name: "Jakarta, Indonesia", tz: 7, lat: -6.28, lon: -106.65 }, { name: "Katmandu, Nepal", tz: 6, lat: 27.67, lon: -85.47 }, { name: "Khabarovsk, Russia", tz: 10, lat: 48.07, lon: -134.63 }, { name: "Khartoum, Sudan", tz: 2, lat: 15.23, lon: -32.57 }, { name: "La Paz, Argentinia", tz: -3, lat: -30.75, lon: 59.67 }, { name: "La Plata, Argentinia", tz: -3, lat: -34.97, lon: 57.97 }, { name: "Limerick, Ireland", tz: 0, lat: 52.7, lon: 8.67 }, { name: "Macao, China", tz: 8, lat: 22.22, lon: -113.6 }, { name: "Managua, Nikaragva", tz: -6, lat: 12.15, lon: 86.32 }, { name: "Manaus", tz: -4, lat: -2.87, lon: 60.12 }, { name: "Maracaibo, Venezuela", tz: -4, lat: 10.52, lon: 71.97 }, { name: "Mbabane, Swasiland", tz: 2, lat: -26.07, lon: -31.15 }, { name: "Monte Carlo, Monaco", tz: 1, lat: 43.73, lon: -7.42 }, { name: "Nassau, Germany", tz: 1, lat: 50.32, lon: -7.8 }, { name: "Nandi, Simbabwe", tz: 2, lat: -20.98, lon: -31.78 }, { name: "Nantes, France", tz: 1, lat: 47.23, lon: 1.48 }, { name: "Noumea, New Caledonia", tz: 11, lat: -22.12, lon: -166.5 }, { name: "Nizhniy Novgorod", tz: 4, lat: 56.33, lon: -44.17 }, { name: "Odense, Denmark", tz: 1, lat: 55.43, lon: 10.3 }, { name: "Osaka, Japan", tz: 9, lat: 34.75, lon: -135.47 }, { name: "Paramaribo, Surinam", tz: -3, lat: 5.77, lon: 55.25 }, { name: "Phnom Penh, Kambodscha", tz: 7, lat: 11.53, lon: -104.78 }, { name: "Port Au Prince, Haiti", tz: -5, lat: 18.57, lon: 72.33 }, { name: "Port Louis, Mauritius", tz: 4, lat: -20.15, lon: -57.5 }, { name: "Port Moresby, Papua-Neuguinea", tz: 10, lat: -9.43, lon: -147 }, { name: "Port Said, Egypt", tz: 2, lat: 30.9, lon: -32.07 }, { name: "Pretoria, South Africa", tz: 2, lat: -25.63, lon: -28.33 }, { name: "San Salvador, El Salvador", tz: -6, lat: 13.98, lon: 89.18 }, { name: "Santo Domingo, Dominican Republic", tz: -4, lat: 18.5, lon: 69.93 }, { name: "Suez, Egypt", tz: 2, lat: 29.97, lon: -32.55 }, { name: "Szeged, Hungary", tz: 1, lat: 46.32, lon: -20.08 }, { name: "Tahiti, Polynesia", tz: -10, lat: -18.3, lon: 149.43 }, { name: "Tegucigalpa, Honduras", tz: -6, lat: 14.28, lon: 87.4 }, { name: "Thessalonikia, Greece", tz: 2, lat: 40.65, lon: -23.02 }, { name: "Thimbu, Bhutan", tz: 6, lat: 27.47, lon: -89.63 }, { name: "Tirana, Albania", tz: 1, lat: 41.35, lon: -19.8 }, { name: "Tijuana, Mexico", tz: -6, lat: 32.48, lon: 117.03 }, { name: "Ulan Bator, Mongolia", tz: 8, lat: 47.45, lon: -106.4 }, { name: "Vaduz, Liechtenstein", tz: 1, lat: 47.13, lon: -9.53 }, { name: "Vientiane, Laos", tz: 7, lat: 17.88, lon: -102.63 }, { name: "Wellington, New Zealand", tz: 12, lat: -41.3, lon: -174.98 }, { name: "Yerevan, Armenia", tz: 4, lat: 39.93, lon: -44.75 }, { name: "Towson, MD", tz: -5, lat: 39.28, lon: 76.62 }, { name: "Florina", tz: 2, lat: 40.78, lon: -21.42 }, { name: "Kishinew, Moldova", tz: 2, lat: 47, lon: -28.83 }, { name: "Belts, Moldova", tz: 2, lat: 47.75, lon: -27.92 }, { name: "Bendery, Moldova", tz: 2, lat: 46.83, lon: -29.47 }, { name: "Cahul, Moldova", tz: 2, lat: 45.9, lon: -28.2 }, { name: "Taraclia, Moldova", tz: 2, lat: 45.9, lon: -28.68 }, { name: "Alexandria, Greece", tz: 2, lat: 40.63, lon: -22.52 }, { name: "Chalkis, Greece", tz: 2, lat: 38.47, lon: -23.6 }, { name: "Drama, Greece", tz: 2, lat: 41.15, lon: -24.17 }, { name: "Kilkis, Greece", tz: 2, lat: 41, lon: -22.9 }, { name: "Larissa, Greece", tz: 2, lat: 39.63, lon: -22.42 }, { name: "Thessaloniki, Greece", tz: 2, lat: 40.63, lon: -22.97 }, { name: "\xC4li Bayramli, Aserbaidschan", tz: 4, lat: 39.93, lon: -48.92 }, { name: "Puta, Aserbaidschan", tz: 4, lat: 40.3, lon: -49.68 }, { name: "Sumqayit, Aserbaidschan", tz: 4, lat: 40.6, lon: -49.75 }, { name: "Siy\xE4z\xE4n, Aserbaidschan", tz: 4, lat: 41.07, lon: -49.1 }, { name: "Decin", tz: 1, lat: 50.8, lon: -14.22 }, { name: "Karlovy Vary", tz: 1, lat: 50.18, lon: -12.87 }, { name: "Zilina", tz: 1, lat: 49.23, lon: -18.77 }, { name: "Appenweier", tz: 1, lat: 48.53, lon: -7.97 }, { name: "Denzlingen", tz: 1, lat: 48.07, lon: -7.87 }, { name: "Ettenheim", tz: 1, lat: 48.25, lon: -7.82 }, { name: "Kehl", tz: 1, lat: 48.58, lon: -7.83 }, { name: "Kenzingen", tz: 1, lat: 48.18, lon: -7.77 }, { name: "Lahr", tz: 1, lat: 48.33, lon: -7.87 }, { name: "Oberkirch", tz: 1, lat: 48.52, lon: -8.08 }, { name: "Offenburg", tz: 1, lat: 48.47, lon: -7.95 }, { name: "Rust, Germany", tz: 1, lat: 48.27, lon: -7.72 }, { name: "Waldkirch", tz: 1, lat: 48.08, lon: -7.95 }, { name: "K\xF6nigs Wusterhausen", tz: 1, lat: 52.3, lon: -13.62 }, { name: "Oderberg", tz: 1, lat: 52.87, lon: -14.03 }, { name: "Oranienburg", tz: 1, lat: 52.75, lon: -13.23 }, { name: "Schwedt/Oder", tz: 1, lat: 53.05, lon: -14.28 }, { name: "Harrow, United Kingdom", tz: 0, lat: 51.58, lon: 0.37 }, { name: "Markkleeberg", tz: 1, lat: 51.28, lon: -12.38 }, { name: "Gap, France", tz: 1, lat: 44.57, lon: -6.08 }, { name: "Amiens, France", tz: 1, lat: 49.9, lon: -2.3 }, { name: "Angers, France", tz: 1, lat: 47.47, lon: 0.55 }, { name: "Bischeim, France", tz: 1, lat: 48.62, lon: -7.75 }, { name: "Chambery, France", tz: 1, lat: 45.57, lon: -6.08 }, { name: "Deauville, France", tz: 1, lat: 49.37, lon: -0.07 }, { name: "Dieuze, France", tz: 1, lat: 48.82, lon: -6.72 }, { name: "Dunkerque, France", tz: 1, lat: 51.05, lon: -2.37 }, { name: "Elbeuf, France", tz: 1, lat: 49.28, lon: -1 }, { name: "Epernay, France", tz: 1, lat: 49.05, lon: -3.95 }, { name: "Epinal, France", tz: 1, lat: 48.18, lon: -6.45 }, { name: "Forbach, France", tz: 1, lat: 49.18, lon: -6.9 }, { name: "Ingwiller, France", tz: 1, lat: 48.87, lon: -7.48 }, { name: "Saint-Laurent-du-Var, France (1)", tz: 1, lat: 45.38, lon: -5.73 }, { name: "La Ciotat, France", tz: 1, lat: 43.17, lon: -5.6 }, { name: "Le Mans, France", tz: 1, lat: 48, lon: -0.2 }, { name: "Libourne, France", tz: 1, lat: 44.92, lon: 0.23 }, { name: "Luneville, France", tz: 1, lat: 48.6, lon: -6.5 }, { name: "Marignane, France", tz: 1, lat: 43.42, lon: -5.22 }, { name: "Melun, France", tz: 1, lat: 48.53, lon: -2.67 }, { name: "Merlebach, France", tz: 1, lat: 49.15, lon: -6.8 }, { name: "Montauban, France", tz: 1, lat: 44.02, lon: -1.35 }, { name: "Montbeliard, France", tz: 1, lat: 47.52, lon: -6.8 }, { name: "Obernai, France", tz: 1, lat: 48.47, lon: -7.48 }, { name: "Pau, France", tz: 1, lat: 43.3, lon: 0.37 }, { name: "Perigueux, France", tz: 1, lat: 45.18, lon: -0.72 }, { name: "Phalsbourg, France", tz: 1, lat: 48.77, lon: -7.27 }, { name: "Poitiers, France", tz: 1, lat: 46.58, lon: -0.33 }, { name: "Reims, France", tz: 1, lat: 49.25, lon: -4.02 }, { name: "Rennes, France", tz: 1, lat: 48.08, lon: 1.68 }, { name: "Roanne, France", tz: 1, lat: 46.03, lon: -4.07 }, { name: "Saint-Avold, France", tz: 1, lat: 49.1, lon: -6.7 }, { name: "Saint-Die, France", tz: 1, lat: 48.28, lon: -6.95 }, { name: "Saint-Etienne, France", tz: 1, lat: 45.43, lon: -4.4 }, { name: "Saint-Fons, France", tz: 1, lat: 45.7, lon: -4.85 }, { name: "Saint-Laurent-du-Var, France (2)", tz: 1, lat: 43.67, lon: -7.18 }, { name: "Saint-Quentin, France", tz: 1, lat: 49.85, lon: -3.28 }, { name: "Sarrebourg, France", tz: 1, lat: 48.73, lon: -7.05 }, { name: "Sarreguemines, France", tz: 1, lat: 49.1, lon: -7.05 }, { name: "Saverne, France", tz: 1, lat: 48.73, lon: -7.37 }, { name: "Sedan, France", tz: 1, lat: 49.7, lon: -4.95 }, { name: "Selestat, France", tz: 1, lat: 48.27, lon: -7.45 }, { name: "Tarbes, France", tz: 1, lat: 43.23, lon: -0.08 }, { name: "Thionville, France", tz: 1, lat: 49.37, lon: -6.17 }, { name: "Toul, France", tz: 1, lat: 48.68, lon: -5.9 }, { name: "Toulon, France", tz: 1, lat: 43.12, lon: -5.93 }, { name: "Valence, France", tz: 1, lat: 44.93, lon: -4.9 }, { name: "Valenciennes, France", tz: 1, lat: 50.35, lon: -3.53 }, { name: "Venissieux, France", tz: 1, lat: 54.68, lon: -4.88 }, { name: "Verdun, France", tz: 1, lat: 49.17, lon: -5.38 }, { name: "Vichy, France", tz: 1, lat: 46.13, lon: -3.43 }, { name: "Berdicev, Ukraine", tz: 2, lat: 49.9, lon: -28.6 }, { name: "Bershad, Ukraine", tz: 2, lat: 48.37, lon: -29.53 }, { name: "Chernigov, Ukraine", tz: 2, lat: 50.83, lon: -24.13 }, { name: "Czernowitz, Chernovtsy, Ukraine", tz: 2, lat: 48.28, lon: -25.97 }, { name: "Dnepropetrovsk, Ukraine", tz: 2, lat: 48.45, lon: -35.03 }, { name: "Donetsk, Ukraine", tz: 2, lat: 48, lon: -37.78 }, { name: "Charkow, Ukraine", tz: 2, lat: 49.92, lon: -36.17 }, { name: "Cherson, Ukraine", tz: 2, lat: 46.65, lon: -32.6 }, { name: "Korosten, Ukraine", tz: 2, lat: 50.95, lon: -28.63 }, { name: "Kremenchug, Ukraine", tz: 2, lat: 49.07, lon: -33.42 }, { name: "Lemberg, Lwow, Ukraine", tz: 2, lat: 49.83, lon: -24.03 }, { name: "Mukacevo, Ukraine", tz: 2, lat: 48.45, lon: -22.72 }, { name: "Nikolayev, Ukraine", tz: 2, lat: 49.52, lon: -23.97 }, { name: "Rachki, Ukraine", tz: 2, lat: 49.5, lon: -29.9 }, { name: "Simferopol, Ukraine", tz: 2, lat: 44.95, lon: -34.1 }, { name: "Slavuta, Ukraine", tz: 2, lat: 50.3, lon: -26.87 }, { name: "Zhitomir, Ukraine", tz: 2, lat: 50.25, lon: -28.67 }, { name: "Beregovoye, Ukraine", tz: 2, lat: 44.9, lon: -33.6 }, { name: "Tinton Falls, NJ", tz: -5, lat: 40.28, lon: 74.1 }, { name: "Warendorf", tz: 1, lat: 51.95, lon: -7.98 }, { name: "M\xFCnster", tz: 1, lat: 51.95, lon: -7.62 }, { name: "Neu Fahrland", tz: 1, lat: 52.45, lon: -13.05 }, { name: "Charlottesville, Virginia", tz: -5, lat: 38.03, lon: 78.48 }, { name: "Hagenow", tz: 1, lat: 53.43, lon: -11.18 }, { name: "Verl", tz: 1, lat: 51.88, lon: -8.52 }, { name: "R\xF6bel", tz: 1, lat: 53.37, lon: -12.6 }, { name: "Nordhausen", tz: 1, lat: 51.5, lon: -10.78 }, { name: "Aschaffenburg", tz: 1, lat: 49.98, lon: -9.15 }, { name: "Ahrweiler", tz: 1, lat: 50.55, lon: -7.13 }, { name: "Cedar Grove, NJ (1)", tz: -5, lat: 40.85, lon: 74.23 }, { name: "Cedar Grove, NJ (2)", tz: -5, lat: 39.97, lon: 74.15 }, { name: "Encinitas, CA", tz: -8, lat: 33.03, lon: 117.28 }, { name: "Calabasas, AZ", tz: -7, lat: 31.47, lon: 110.97 }, { name: "Calabasas, CA", tz: -8, lat: 34.15, lon: 118.63 }, { name: "Rottweil", tz: 1, lat: 48.17, lon: -8.62 }];
|
|
1924
|
+
|
|
1925
|
+
// src/Locations.ts
|
|
1926
|
+
var Locations = locations_default.map((l) => new Location(l.name, l.heb, !!l.il, l.lat, l.lon, l.tz, l.el || 0, l.cl));
|
|
1927
|
+
Locations.sort(function(a, b) {
|
|
1928
|
+
return a.Name > b.Name ? 1 : b.Name > a.Name ? -1 : 0;
|
|
1929
|
+
});
|
|
1930
|
+
var justNames = [];
|
|
1931
|
+
for (let i = 0; i < Locations.length - 1; i++) {
|
|
1932
|
+
const l = Locations[i];
|
|
1933
|
+
justNames.push({
|
|
1934
|
+
name: l.Name.split(",", 1)[0].toLowerCase(),
|
|
1935
|
+
index: i
|
|
1936
|
+
});
|
|
1937
|
+
if (!!l.NameHebrew) {
|
|
1938
|
+
justNames.push({
|
|
1939
|
+
name: l.NameHebrew,
|
|
1940
|
+
index: i
|
|
1941
|
+
});
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
function distancePointToPoint(point1, point2) {
|
|
1945
|
+
if (point1.latitude == point2.latitude && point1.longitude == point2.longitude) {
|
|
1946
|
+
return 0;
|
|
1947
|
+
} else {
|
|
1948
|
+
var radlat1 = Math.PI * point1.latitude / 180;
|
|
1949
|
+
var radlat2 = Math.PI * point2.latitude / 180;
|
|
1950
|
+
var theta = point1.longitude - point2.longitude;
|
|
1951
|
+
var radtheta = Math.PI * theta / 180;
|
|
1952
|
+
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
|
|
1953
|
+
if (dist > 1) {
|
|
1954
|
+
dist = 1;
|
|
1955
|
+
}
|
|
1956
|
+
dist = Math.acos(dist);
|
|
1957
|
+
dist = dist * 180 / Math.PI;
|
|
1958
|
+
dist = dist * 60 * 1.1515;
|
|
1959
|
+
dist = dist * 1.609344;
|
|
1960
|
+
return dist;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
function closestDistanceMatch(point) {
|
|
1964
|
+
let curr = { dist: 1e5 };
|
|
1965
|
+
for (let location of Locations) {
|
|
1966
|
+
const dist = distancePointToPoint(point, { latitude: location.Latitude, longitude: location.Longitude });
|
|
1967
|
+
if (dist < curr.dist) {
|
|
1968
|
+
curr = { dist, location };
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
return curr.location;
|
|
1972
|
+
}
|
|
1973
|
+
function closestNameMatch(val) {
|
|
1974
|
+
let curr = { dist: 1e5 };
|
|
1975
|
+
for (let location of justNames) {
|
|
1976
|
+
const dist = distance(val.toLowerCase(), location.name);
|
|
1977
|
+
if (dist < curr.dist) {
|
|
1978
|
+
curr = { dist, location };
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
return curr.location ? Locations[curr.location.index] : void 0;
|
|
1982
|
+
}
|
|
1983
|
+
function findLocation(nameOrCoordinates) {
|
|
1984
|
+
if (typeof nameOrCoordinates === "string") {
|
|
1985
|
+
const exactNameMatch = Locations.find((l) => l.Name.toLowerCase() === nameOrCoordinates.toLowerCase() || l.NameHebrew === nameOrCoordinates);
|
|
1986
|
+
if (!!exactNameMatch) {
|
|
1987
|
+
return exactNameMatch;
|
|
1988
|
+
}
|
|
1989
|
+
const cityOnlyNameMatch = justNames.find((l) => l.name === nameOrCoordinates.toLowerCase());
|
|
1990
|
+
if (!!cityOnlyNameMatch) {
|
|
1991
|
+
return Locations[cityOnlyNameMatch.index];
|
|
1992
|
+
}
|
|
1993
|
+
return closestNameMatch(nameOrCoordinates.toLowerCase());
|
|
1994
|
+
} else {
|
|
1995
|
+
const exactCoordinateMatch = Locations.find((l) => l.Latitude === nameOrCoordinates.latitude && l.Longitude === nameOrCoordinates.longitude);
|
|
1996
|
+
if (!!exactCoordinateMatch) {
|
|
1997
|
+
return exactCoordinateMatch;
|
|
1998
|
+
}
|
|
1999
|
+
return closestDistanceMatch(nameOrCoordinates);
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
// src/ZmanTypes.ts
|
|
2004
|
+
var ZmanTypeIds = Object.freeze({
|
|
2005
|
+
ChatzosLayla: 0,
|
|
2006
|
+
Alos90: 1,
|
|
2007
|
+
Alos72: 2,
|
|
2008
|
+
TalisTefillin: 3,
|
|
2009
|
+
NetzAtElevation: 4,
|
|
2010
|
+
NetzMishor: 5,
|
|
2011
|
+
szksMga: 6,
|
|
2012
|
+
szksGra: 7,
|
|
2013
|
+
sztMga: 8,
|
|
2014
|
+
sztGra: 9,
|
|
2015
|
+
chatzosDay: 10,
|
|
2016
|
+
minGed: 11,
|
|
2017
|
+
minKet: 12,
|
|
2018
|
+
plag: 13,
|
|
2019
|
+
shkiaAtSeaLevel: 14,
|
|
2020
|
+
shkiaElevation: 15,
|
|
2021
|
+
tzais45: 16,
|
|
2022
|
+
tzais50: 17,
|
|
2023
|
+
tzais72: 18,
|
|
2024
|
+
rabbeinuTamZmanios: 19,
|
|
2025
|
+
rabbeinuTamZmaniosMga: 20,
|
|
2026
|
+
candleLighting: 21,
|
|
2027
|
+
SofZmanEatingChometz: 22,
|
|
2028
|
+
SofZmanBurnChometz: 23
|
|
2029
|
+
});
|
|
2030
|
+
var ZmanTypes = [
|
|
2031
|
+
{
|
|
2032
|
+
id: ZmanTypeIds.ChatzosLayla,
|
|
2033
|
+
desc: "\u05D7\u05E6\u05D5\u05EA \u05D4\u05DC\u05D9\u05DC\u05D4",
|
|
2034
|
+
eng: "Chatzos - Midnight",
|
|
2035
|
+
heb: "\u05D7\u05E6\u05D5\u05EA \u05D4\u05DC\u05D9\u05DC\u05D4"
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
id: ZmanTypeIds.Alos90,
|
|
2039
|
+
desc: "\u05E2\u05DC\u05D5\u05EA \u05D4\u05E9\u05D7\u05E8 - 90 \u05D3\u05E7\u05D5\u05EA",
|
|
2040
|
+
eng: "Alos Hashachar - 90",
|
|
2041
|
+
heb: "\u05E2\u05DC\u05D5\u05EA \u05D4\u05E9\u05D7\u05E8 (90)"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
id: ZmanTypeIds.Alos72,
|
|
2045
|
+
desc: "\u05E2\u05DC\u05D5\u05EA \u05D4\u05E9\u05D7\u05E8 - 72 \u05D3\u05E7\u05D5\u05EA",
|
|
2046
|
+
eng: "Alos Hashachar - 72",
|
|
2047
|
+
heb: "\u05E2\u05DC\u05D5\u05EA \u05D4\u05E9\u05D7\u05E8 (72)"
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
id: ZmanTypeIds.TalisTefillin,
|
|
2051
|
+
desc: "\u05D6\u05DE\u05DF \u05E2\u05D8\u05D9\u05E4\u05EA \u05D8\u05DC\u05D9\u05EA \u05D5\u05EA\u05E4\u05D9\u05DC\u05D9\u05DF - 36 \u05D3\u05E7\u05D5\u05EA",
|
|
2052
|
+
eng: "Taliss and Tefillin",
|
|
2053
|
+
heb: "\u05D8\u05DC\u05D9\u05EA \u05D5\u05EA\u05E4\u05D9\u05DC\u05D9\u05DF"
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
id: ZmanTypeIds.NetzAtElevation,
|
|
2057
|
+
desc: "\u05D4\u05E0\u05E5 \u05D4\u05D7\u05DE\u05D4 \u05D1\u05D2\u05D5\u05D1\u05D4 \u05D4\u05DE\u05D9\u05E7\u05D5\u05DD",
|
|
2058
|
+
eng: "Sunrise at current elevation",
|
|
2059
|
+
heb: "\u05D4\u05E0\u05E5 \u05D4\u05D7\u05DE\u05D4 - \u05DE\u05D2\u05D5\u05D1\u05D4"
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
id: ZmanTypeIds.NetzMishor,
|
|
2063
|
+
desc: "\u05D4\u05E0\u05E5 \u05D4\u05D7\u05DE\u05D4 \u05D1\u05D2\u05D5\u05D1\u05D4 \u05E4\u05E0\u05D9 \u05D4\u05D9\u05DD",
|
|
2064
|
+
eng: "Sunrise",
|
|
2065
|
+
heb: "\u05D4\u05E0\u05E5 \u05D4\u05D7\u05DE\u05D4"
|
|
2066
|
+
},
|
|
2067
|
+
{
|
|
2068
|
+
id: ZmanTypeIds.szksMga,
|
|
2069
|
+
desc: '\u05E1\u05D6\u05E7"\u05E9 \u05DE\u05D2"\u05D0',
|
|
2070
|
+
eng: 'Zman Krias Shma - MG"A',
|
|
2071
|
+
heb: '\u05E1\u05D6\u05E7"\u05E9 \u05DE\u05D2"\u05D0'
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
id: ZmanTypeIds.szksGra,
|
|
2075
|
+
desc: '\u05E1\u05D6\u05E7"\u05E9 \u05D4\u05D2\u05E8"\u05D0',
|
|
2076
|
+
eng: 'Zman Krias Shma - GR"A',
|
|
2077
|
+
heb: '\u05E1\u05D6\u05E7"\u05E9 \u05D4\u05D2\u05E8"\u05D0'
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
id: ZmanTypeIds.sztMga,
|
|
2081
|
+
desc: '\u05E1\u05D6"\u05EA \u05DE\u05D2"\u05D0',
|
|
2082
|
+
eng: 'Zman Tefilla - MG"A',
|
|
2083
|
+
heb: '\u05E1\u05D6"\u05EA \u05DE\u05D2"\u05D0'
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
id: ZmanTypeIds.sztGra,
|
|
2087
|
+
desc: '\u05E1\u05D6"\u05EA \u05D4\u05D2\u05E8"\u05D0',
|
|
2088
|
+
eng: 'Zman Tefilla - GR"A',
|
|
2089
|
+
heb: '\u05E1\u05D6"\u05EA \u05D4\u05D2\u05E8"\u05D0'
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
id: ZmanTypeIds.chatzosDay,
|
|
2093
|
+
desc: "\u05D7\u05E6\u05D5\u05EA \u05D4\u05D9\u05D5\u05DD",
|
|
2094
|
+
eng: "Chatzos - Midday",
|
|
2095
|
+
heb: "\u05D7\u05E6\u05D5\u05EA \u05D4\u05D9\u05D5\u05DD"
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
id: ZmanTypeIds.minGed,
|
|
2099
|
+
desc: "\u05DE\u05E0\u05D7\u05D4 \u05D2\u05D3\u05D5\u05DC\u05D4",
|
|
2100
|
+
eng: "Mincha Gedola",
|
|
2101
|
+
heb: "\u05DE\u05E0\u05D7\u05D4 \u05D2\u05D3\u05D5\u05DC\u05D4"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
id: ZmanTypeIds.minKet,
|
|
2105
|
+
desc: "\u05DE\u05E0\u05D7\u05D4 \u05E7\u05D8\u05E0\u05D4",
|
|
2106
|
+
eng: "Mincha Ketana",
|
|
2107
|
+
heb: "\u05DE\u05E0\u05D7\u05D4 \u05E7\u05D8\u05E0\u05D4"
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
id: ZmanTypeIds.plag,
|
|
2111
|
+
desc: "\u05E4\u05DC\u05D2 \u05D4\u05DE\u05E0\u05D7\u05D4",
|
|
2112
|
+
eng: "Plag HaMincha",
|
|
2113
|
+
heb: "\u05E4\u05DC\u05D2 \u05D4\u05DE\u05E0\u05D7\u05D4"
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
id: ZmanTypeIds.shkiaAtSeaLevel,
|
|
2117
|
+
desc: "\u05E9\u05E7\u05D9\u05E2\u05EA \u05D4\u05D7\u05DE\u05D4 \u05DE\u05D2\u05D5\u05D1\u05D4 \u05E4\u05E0\u05D9 \u05D4\u05D9\u05DD",
|
|
2118
|
+
eng: "Sunset at sea level",
|
|
2119
|
+
heb: "\u05E9\u05E7\u05D9\u05E2\u05EA \u05D4\u05D7\u05DE\u05D4 - \u05DE\u05DE\u05D9\u05E9\u05D5\u05E8"
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
id: ZmanTypeIds.shkiaElevation,
|
|
2123
|
+
desc: "\u05E9\u05E7\u05D9\u05E2\u05EA \u05D4\u05D7\u05DE\u05D4 \u05DE\u05D2\u05D5\u05D1\u05D4 \u05D4\u05DE\u05D9\u05E7\u05D5\u05DD",
|
|
2124
|
+
eng: "Sunset",
|
|
2125
|
+
heb: "\u05E9\u05E7\u05D9\u05E2\u05EA \u05D4\u05D7\u05DE\u05D4"
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
id: ZmanTypeIds.tzais45,
|
|
2129
|
+
desc: "45 \u05D3\u05E7\u05D5\u05EA \u05D0\u05D7\u05E8\u05D9 \u05E9\u05E7\u05D9\u05E2\u05D4",
|
|
2130
|
+
eng: "Nightfall - 45",
|
|
2131
|
+
heb: "\u05E6\u05D0\u05EA \u05D4\u05DB\u05D5\u05DB\u05D1\u05D9\u05DD (45)"
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
id: ZmanTypeIds.tzais50,
|
|
2135
|
+
desc: "50 \u05D3\u05E7\u05D5\u05EA \u05D0\u05D7\u05E8\u05D9 \u05E9\u05E7\u05D9\u05E2\u05D4",
|
|
2136
|
+
eng: "Nightfall - 50",
|
|
2137
|
+
heb: "\u05E6\u05D0\u05EA \u05D4\u05DB\u05D5\u05DB\u05D1\u05D9\u05DD (50)"
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
id: ZmanTypeIds.tzais72,
|
|
2141
|
+
desc: "72 \u05D3\u05E7\u05D5\u05EA \u05D0\u05D7\u05E8\u05D9 \u05E9\u05E7\u05D9\u05E2\u05D4",
|
|
2142
|
+
eng: "Rabbeinu Tam",
|
|
2143
|
+
heb: '\u05E6\u05D4"\u05DB \u05E8"\u05EA - 72 \u05D3\u05E7\u05D5\u05EA'
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
id: ZmanTypeIds.rabbeinuTamZmanios,
|
|
2147
|
+
desc: "72 \u05D3\u05E7\u05D5\u05EA \u05D6\u05DE\u05E0\u05D9\u05D5\u05EA \u05D0\u05D7\u05E8\u05D9 \u05E9\u05E7\u05D9\u05E2\u05D4",
|
|
2148
|
+
eng: "Rabbeinu Tam - Zmanios",
|
|
2149
|
+
heb: '\u05E6\u05D4"\u05DB \u05E8"\u05EA - \u05D6\u05DE\u05E0\u05D9\u05D5\u05EA'
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
id: ZmanTypeIds.rabbeinuTamZmaniosMga,
|
|
2153
|
+
desc: '72 \u05D3\u05E7\u05D5\u05EA \u05D6\u05DE\u05E0\u05D9\u05D5\u05EA \u05D0\u05D7\u05E8\u05D9 \u05E9\u05E7\u05D9\u05E2\u05D4 - \u05DE\u05D2"\u05D0',
|
|
2154
|
+
eng: 'Rabbeinu Tam - Zmanios MG"A',
|
|
2155
|
+
heb: '\u05E6\u05D4"\u05DB \u05E8"\u05EA - \u05D6\u05DE\u05E0\u05D9\u05D5\u05EA \u05DE\u05D2"\u05D0'
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
id: ZmanTypeIds.candleLighting,
|
|
2159
|
+
desc: "\u05D6\u05DE\u05DF \u05D4\u05D3\u05DC\u05E7\u05EA \u05E0\u05E8\u05D5\u05EA",
|
|
2160
|
+
eng: "Candle lighting time",
|
|
2161
|
+
heb: "\u05D6\u05DE\u05DF \u05D4\u05D3\u05DC\u05E7\u05EA \u05E0\u05E8\u05D5\u05EA"
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
id: ZmanTypeIds.SofZmanEatingChometz,
|
|
2165
|
+
desc: "\u05E1\u05D5\u05E3 \u05D6\u05DE\u05DF \u05D0\u05DB\u05D9\u05DC\u05EA \u05D7\u05DE\u05E5",
|
|
2166
|
+
eng: "Stop eating Chometz",
|
|
2167
|
+
heb: "\u05E1\u05D5\u05E3 \u05D6\u05DE\u05DF \u05D0\u05DB\u05D9\u05DC\u05EA \u05D7\u05DE\u05E5"
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
id: ZmanTypeIds.SofZmanBurnChometz,
|
|
2171
|
+
desc: "\u05E1\u05D5\u05E3 \u05D6\u05DE\u05DF \u05D1\u05D9\u05E2\u05D5\u05E8 \u05D7\u05DE\u05E5",
|
|
2172
|
+
eng: "Destroy Chometz",
|
|
2173
|
+
heb: "\u05E1\u05D5\u05E3 \u05D6\u05DE\u05DF \u05D1\u05D9\u05E2\u05D5\u05E8 \u05D7\u05DE\u05E5"
|
|
2174
|
+
}
|
|
2175
|
+
];
|
|
2176
|
+
function getZmanType(idOrName) {
|
|
2177
|
+
return ZmanTypes.find((zt) => zt.id === idOrName || zt.eng === idOrName || zt.heb === idOrName || zt.desc === idOrName);
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
// src/JCal/Molad.ts
|
|
2181
|
+
var Molad = class _Molad {
|
|
2182
|
+
/**
|
|
2183
|
+
* @param {Number} month
|
|
2184
|
+
* @param {Number} year
|
|
2185
|
+
* @returns {{jDate:jDate,time:Time,chalakim:number}}
|
|
2186
|
+
*/
|
|
2187
|
+
static getMolad(month, year) {
|
|
2188
|
+
let totalMonths, partsElapsed, hoursElapsed, parts, monthAdj = month - 7;
|
|
2189
|
+
if (monthAdj < 0) {
|
|
2190
|
+
monthAdj += jDate.monthsJYear(year);
|
|
2191
|
+
}
|
|
2192
|
+
totalMonths = Utils.toInt(monthAdj + 235 * Utils.toInt((year - 1) / 19) + 12 * ((year - 1) % 19) + ((year - 1) % 19 * 7 + 1) / 19);
|
|
2193
|
+
partsElapsed = 204 + 793 * (totalMonths % 1080);
|
|
2194
|
+
hoursElapsed = 5 + 12 * totalMonths + 793 * Utils.toInt(totalMonths / 1080) + Utils.toInt(partsElapsed / 1080) - 6;
|
|
2195
|
+
parts = Utils.toInt(partsElapsed % 1080 + 1080 * (hoursElapsed % 24));
|
|
2196
|
+
return {
|
|
2197
|
+
jDate: new jDate(1 + 29 * Utils.toInt(totalMonths) + Utils.toInt(hoursElapsed / 24)),
|
|
2198
|
+
time: { hour: Utils.toInt(hoursElapsed) % 24, minute: Utils.toInt(parts % 1080 / 18), second: 0 },
|
|
2199
|
+
chalakim: parts % 18
|
|
2200
|
+
};
|
|
2201
|
+
}
|
|
2202
|
+
/**
|
|
2203
|
+
* Returns the time of the molad as a string in the format: Monday Night, 8:33 PM and 12 Chalakim
|
|
2204
|
+
* The molad is always in Jerusalem so we use the Jerusalem sunset times
|
|
2205
|
+
* to determine whether to display "Night" or "Motzai Shabbos" etc. (check this...)
|
|
2206
|
+
* @param {Number} year
|
|
2207
|
+
* @param {Number} month
|
|
2208
|
+
*/
|
|
2209
|
+
static getString(year, month) {
|
|
2210
|
+
const molad = _Molad.getMolad(month, year), zmanim = molad.jDate.getSunriseSunset(Location.getJerusalem()), isNight = Utils.isTimeAfter(zmanim.sunset, molad.time), dow = molad.jDate.getDayOfWeek();
|
|
2211
|
+
let str = "";
|
|
2212
|
+
if (!zmanim.sunset || isNaN(zmanim.sunset.hour)) {
|
|
2213
|
+
str += DaysOfWeekEng[dow];
|
|
2214
|
+
} else if (dow === 6 && isNight) {
|
|
2215
|
+
str += "Motzai Shabbos,";
|
|
2216
|
+
} else if (dow === 5 && isNight) {
|
|
2217
|
+
str += "Shabbos Night,";
|
|
2218
|
+
} else {
|
|
2219
|
+
str += DaysOfWeekEng[dow] + (isNight ? " Night" : "");
|
|
2220
|
+
}
|
|
2221
|
+
str += " " + Utils.getTimeString(molad.time) + " and " + molad.chalakim.toString() + " Chalakim";
|
|
2222
|
+
return str;
|
|
2223
|
+
}
|
|
2224
|
+
/**
|
|
2225
|
+
* Returns the time of the molad as a string in the format: ליל שני 20:33 12 חלקים
|
|
2226
|
+
* The molad is always in Jerusalem so we use the Jerusalem sunset times
|
|
2227
|
+
* to determine whether to display "ליל/יום" or "מוצאי שב"ק" etc.
|
|
2228
|
+
* @param {Number} year
|
|
2229
|
+
* @param {Number} month
|
|
2230
|
+
*/
|
|
2231
|
+
static getStringHeb(year, month) {
|
|
2232
|
+
const molad = _Molad.getMolad(month, year), zmanim = molad.jDate.getSunriseSunset(Location.getJerusalem()), isNight = Utils.isTimeAfter(zmanim.sunset, molad.time) && Utils.isTimeAfter(molad.time, zmanim.sunrise), dow = molad.jDate.getDayOfWeek();
|
|
2233
|
+
let str = "";
|
|
2234
|
+
if (dow === 6) {
|
|
2235
|
+
str += isNight ? '\u05DE\u05D5\u05E6\u05D0\u05D9 \u05E9\u05D1"\u05E7' : '\u05D9\u05D5\u05DD \u05E9\u05D1"\u05E7';
|
|
2236
|
+
} else if (dow === 5) {
|
|
2237
|
+
str += isNight ? '\u05DC\u05D9\u05DC \u05E9\u05D1"\u05E7' : '\u05E2\u05E8\u05D1 \u05E9\u05D1"\u05E7';
|
|
2238
|
+
} else {
|
|
2239
|
+
str += (isNight ? "\u05DC\u05D9\u05DC" : "\u05D9\u05D5\u05DD") + DaysOfWeekHeb[dow].replace("\u05D9\u05D5\u05DD", "");
|
|
2240
|
+
}
|
|
2241
|
+
str += " " + Utils.getTimeString(molad.time, 1, true) + " " + molad.chalakim.toString() + " \u05D7\u05DC\u05E7\u05D9\u05DD";
|
|
2242
|
+
return str;
|
|
2243
|
+
}
|
|
2244
|
+
};
|
|
2245
|
+
|
|
2246
|
+
// src/JCal/ZmanimUtils.ts
|
|
2247
|
+
var WhichDaysFlags = Object.freeze({
|
|
2248
|
+
SUNDAY: 1,
|
|
2249
|
+
MONDAY: 2,
|
|
2250
|
+
TUESDAY: 4,
|
|
2251
|
+
WEDNESDAY: 8,
|
|
2252
|
+
THURSDAY: 16,
|
|
2253
|
+
FRIDAY: 32,
|
|
2254
|
+
SHABBOS: 64,
|
|
2255
|
+
YOMTOV: 128
|
|
2256
|
+
});
|
|
2257
|
+
var _ZmanimUtils = class _ZmanimUtils {
|
|
2258
|
+
/**
|
|
2259
|
+
* Gets the zmanim for all the types in the given list.
|
|
2260
|
+
* @param {[ZmanToShow]} zmanTypes An array of ZmanTypes to get the zman for.
|
|
2261
|
+
* @param {Date} date The secular date to get the zmanim for
|
|
2262
|
+
* @param {jDate} jdate The jewish date to get the zmanim for
|
|
2263
|
+
* @param {Location} location The location for which to get the zmanim
|
|
2264
|
+
* @returns{[{zmanType:{id:number,offset:?number,desc:string,eng:string,heb:string },time:Time}]}
|
|
2265
|
+
*/
|
|
2266
|
+
static getZmanTimes(zmanTypes, date, jdate, location) {
|
|
2267
|
+
const mem = _ZmanimUtils.zmanTimesCache.find(
|
|
2268
|
+
(z) => Utils.isSameSdate(z.date, date) && z.location.Name === location.Name
|
|
2269
|
+
), zmanTimes = [], whichDay = _ZmanimUtils.getWhichDays(date, jdate, location);
|
|
2270
|
+
let sunrise, sunset, suntimesMishor, sunriseMishor, sunsetMishor, mishorNeg90, chatzos, shaaZmanis, shaaZmanisMga;
|
|
2271
|
+
if (mem) {
|
|
2272
|
+
sunrise = mem.sunrise;
|
|
2273
|
+
sunset = mem.sunset;
|
|
2274
|
+
suntimesMishor = mem.suntimesMishor;
|
|
2275
|
+
sunriseMishor = mem.sunriseMishor;
|
|
2276
|
+
sunsetMishor = mem.sunsetMishor;
|
|
2277
|
+
mishorNeg90 = mem.mishorNeg90;
|
|
2278
|
+
chatzos = mem.chatzos;
|
|
2279
|
+
shaaZmanis = mem.shaaZmanis;
|
|
2280
|
+
shaaZmanisMga = mem.shaaZmanisMga;
|
|
2281
|
+
} else {
|
|
2282
|
+
const suntimes = Zmanim.getSunTimes(date, location, true);
|
|
2283
|
+
sunrise = suntimes.sunrise;
|
|
2284
|
+
sunset = suntimes.sunset;
|
|
2285
|
+
suntimesMishor = Zmanim.getSunTimes(date, location, false);
|
|
2286
|
+
sunriseMishor = suntimesMishor.sunrise;
|
|
2287
|
+
sunsetMishor = suntimesMishor.sunset;
|
|
2288
|
+
mishorNeg90 = Utils.addMinutes(sunriseMishor, -90);
|
|
2289
|
+
chatzos = sunriseMishor && sunsetMishor && Zmanim.getChatzosFromSuntimes(suntimesMishor);
|
|
2290
|
+
shaaZmanis = sunriseMishor && sunsetMishor && Zmanim.getShaaZmanisFromSunTimes(suntimesMishor);
|
|
2291
|
+
shaaZmanisMga = sunriseMishor && sunsetMishor && Zmanim.getShaaZmanisMga(suntimesMishor, true);
|
|
2292
|
+
_ZmanimUtils.zmanTimesCache.push({
|
|
2293
|
+
date,
|
|
2294
|
+
location,
|
|
2295
|
+
sunrise,
|
|
2296
|
+
sunset,
|
|
2297
|
+
suntimesMishor,
|
|
2298
|
+
sunriseMishor,
|
|
2299
|
+
sunsetMishor,
|
|
2300
|
+
mishorNeg90,
|
|
2301
|
+
chatzos,
|
|
2302
|
+
shaaZmanis,
|
|
2303
|
+
shaaZmanisMga
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
for (let zmanType of zmanTypes) {
|
|
2307
|
+
const offset = zmanType.offset && (!zmanType.whichDaysFlags || zmanType.whichDaysFlags & whichDay) ? zmanType.offset : 0;
|
|
2308
|
+
switch (zmanType.id) {
|
|
2309
|
+
case ZmanTypeIds.ChatzosLayla:
|
|
2310
|
+
zmanTimes.push({
|
|
2311
|
+
zmanType,
|
|
2312
|
+
time: Utils.addMinutes(chatzos, 720 + offset)
|
|
2313
|
+
});
|
|
2314
|
+
break;
|
|
2315
|
+
case ZmanTypeIds.Alos90:
|
|
2316
|
+
zmanTimes.push({
|
|
2317
|
+
zmanType,
|
|
2318
|
+
time: offset ? Utils.addMinutes(mishorNeg90, offset) : mishorNeg90
|
|
2319
|
+
});
|
|
2320
|
+
break;
|
|
2321
|
+
case ZmanTypeIds.Alos72:
|
|
2322
|
+
zmanTimes.push({
|
|
2323
|
+
zmanType,
|
|
2324
|
+
time: Utils.addMinutes(sunriseMishor, -72 + offset)
|
|
2325
|
+
});
|
|
2326
|
+
break;
|
|
2327
|
+
case ZmanTypeIds.TalisTefillin:
|
|
2328
|
+
zmanTimes.push({
|
|
2329
|
+
zmanType,
|
|
2330
|
+
time: Utils.addMinutes(sunriseMishor, -36 + offset)
|
|
2331
|
+
});
|
|
2332
|
+
break;
|
|
2333
|
+
case ZmanTypeIds.NetzAtElevation:
|
|
2334
|
+
zmanTimes.push({
|
|
2335
|
+
zmanType,
|
|
2336
|
+
time: offset ? Utils.addMinutes(sunrise, offset) : sunrise
|
|
2337
|
+
});
|
|
2338
|
+
break;
|
|
2339
|
+
case ZmanTypeIds.NetzMishor:
|
|
2340
|
+
zmanTimes.push({
|
|
2341
|
+
zmanType,
|
|
2342
|
+
time: offset ? Utils.addMinutes(sunriseMishor, offset) : sunriseMishor
|
|
2343
|
+
});
|
|
2344
|
+
break;
|
|
2345
|
+
case ZmanTypeIds.szksMga:
|
|
2346
|
+
if (shaaZmanisMga)
|
|
2347
|
+
zmanTimes.push({
|
|
2348
|
+
zmanType,
|
|
2349
|
+
time: Utils.addMinutes(
|
|
2350
|
+
mishorNeg90,
|
|
2351
|
+
Math.floor(shaaZmanisMga * 3) + offset
|
|
2352
|
+
)
|
|
2353
|
+
});
|
|
2354
|
+
break;
|
|
2355
|
+
case ZmanTypeIds.szksGra:
|
|
2356
|
+
if (shaaZmanis)
|
|
2357
|
+
zmanTimes.push({
|
|
2358
|
+
zmanType,
|
|
2359
|
+
time: Utils.addMinutes(
|
|
2360
|
+
sunriseMishor,
|
|
2361
|
+
Math.floor(shaaZmanis * 3) + offset
|
|
2362
|
+
)
|
|
2363
|
+
});
|
|
2364
|
+
break;
|
|
2365
|
+
case ZmanTypeIds.sztMga:
|
|
2366
|
+
if (shaaZmanisMga)
|
|
2367
|
+
zmanTimes.push({
|
|
2368
|
+
zmanType,
|
|
2369
|
+
time: Utils.addMinutes(
|
|
2370
|
+
mishorNeg90,
|
|
2371
|
+
Math.floor(shaaZmanisMga * 4) + offset
|
|
2372
|
+
)
|
|
2373
|
+
});
|
|
2374
|
+
break;
|
|
2375
|
+
case ZmanTypeIds.sztGra:
|
|
2376
|
+
if (shaaZmanis)
|
|
2377
|
+
zmanTimes.push({
|
|
2378
|
+
zmanType,
|
|
2379
|
+
time: Utils.addMinutes(
|
|
2380
|
+
sunriseMishor,
|
|
2381
|
+
Math.floor(shaaZmanis * 4) + offset
|
|
2382
|
+
)
|
|
2383
|
+
});
|
|
2384
|
+
break;
|
|
2385
|
+
case ZmanTypeIds.chatzosDay:
|
|
2386
|
+
zmanTimes.push({
|
|
2387
|
+
zmanType,
|
|
2388
|
+
time: offset ? Utils.addMinutes(chatzos, offset) : chatzos
|
|
2389
|
+
});
|
|
2390
|
+
break;
|
|
2391
|
+
case ZmanTypeIds.minGed:
|
|
2392
|
+
if (shaaZmanis)
|
|
2393
|
+
zmanTimes.push({
|
|
2394
|
+
zmanType,
|
|
2395
|
+
time: Utils.addMinutes(
|
|
2396
|
+
chatzos,
|
|
2397
|
+
shaaZmanis * 0.5 + offset
|
|
2398
|
+
)
|
|
2399
|
+
});
|
|
2400
|
+
break;
|
|
2401
|
+
case ZmanTypeIds.minKet:
|
|
2402
|
+
if (shaaZmanis)
|
|
2403
|
+
zmanTimes.push({
|
|
2404
|
+
zmanType,
|
|
2405
|
+
time: Utils.addMinutes(
|
|
2406
|
+
sunriseMishor,
|
|
2407
|
+
shaaZmanis * 9.5 + offset
|
|
2408
|
+
)
|
|
2409
|
+
});
|
|
2410
|
+
break;
|
|
2411
|
+
case ZmanTypeIds.plag:
|
|
2412
|
+
if (shaaZmanis)
|
|
2413
|
+
zmanTimes.push({
|
|
2414
|
+
zmanType,
|
|
2415
|
+
time: Utils.addMinutes(
|
|
2416
|
+
sunriseMishor,
|
|
2417
|
+
shaaZmanis * 10.75 + offset
|
|
2418
|
+
)
|
|
2419
|
+
});
|
|
2420
|
+
break;
|
|
2421
|
+
case ZmanTypeIds.shkiaAtSeaLevel:
|
|
2422
|
+
zmanTimes.push({
|
|
2423
|
+
zmanType,
|
|
2424
|
+
time: offset ? Utils.addMinutes(sunsetMishor, offset) : sunsetMishor
|
|
2425
|
+
});
|
|
2426
|
+
break;
|
|
2427
|
+
case ZmanTypeIds.shkiaElevation:
|
|
2428
|
+
zmanTimes.push({
|
|
2429
|
+
zmanType,
|
|
2430
|
+
time: offset ? Utils.addMinutes(sunset, offset) : sunset
|
|
2431
|
+
});
|
|
2432
|
+
break;
|
|
2433
|
+
case ZmanTypeIds.tzais45:
|
|
2434
|
+
zmanTimes.push({
|
|
2435
|
+
zmanType,
|
|
2436
|
+
time: Utils.addMinutes(sunset, 45 + offset)
|
|
2437
|
+
});
|
|
2438
|
+
break;
|
|
2439
|
+
case ZmanTypeIds.tzais50:
|
|
2440
|
+
zmanTimes.push({
|
|
2441
|
+
zmanType,
|
|
2442
|
+
time: Utils.addMinutes(sunset, 50 + offset)
|
|
2443
|
+
});
|
|
2444
|
+
break;
|
|
2445
|
+
case ZmanTypeIds.tzais72:
|
|
2446
|
+
zmanTimes.push({
|
|
2447
|
+
zmanType,
|
|
2448
|
+
time: Utils.addMinutes(sunset, 72 + offset)
|
|
2449
|
+
});
|
|
2450
|
+
break;
|
|
2451
|
+
case ZmanTypeIds.rabbeinuTamZmanios:
|
|
2452
|
+
if (shaaZmanis)
|
|
2453
|
+
zmanTimes.push({
|
|
2454
|
+
zmanType,
|
|
2455
|
+
time: Utils.addMinutes(
|
|
2456
|
+
sunset,
|
|
2457
|
+
shaaZmanis * 1.2 + offset
|
|
2458
|
+
)
|
|
2459
|
+
});
|
|
2460
|
+
break;
|
|
2461
|
+
case ZmanTypeIds.rabbeinuTamZmaniosMga:
|
|
2462
|
+
if (shaaZmanisMga)
|
|
2463
|
+
zmanTimes.push({
|
|
2464
|
+
zmanType,
|
|
2465
|
+
time: Utils.addMinutes(
|
|
2466
|
+
sunset,
|
|
2467
|
+
shaaZmanisMga * 1.2 + offset
|
|
2468
|
+
)
|
|
2469
|
+
});
|
|
2470
|
+
break;
|
|
2471
|
+
case ZmanTypeIds.candleLighting:
|
|
2472
|
+
if (sunset && jdate.hasCandleLighting()) {
|
|
2473
|
+
zmanTimes.push({
|
|
2474
|
+
zmanType,
|
|
2475
|
+
time: Utils.addMinutes(
|
|
2476
|
+
Zmanim.getCandleLightingFromSunset(
|
|
2477
|
+
sunset,
|
|
2478
|
+
location
|
|
2479
|
+
),
|
|
2480
|
+
offset
|
|
2481
|
+
)
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2484
|
+
break;
|
|
2485
|
+
case ZmanTypeIds.SofZmanEatingChometz:
|
|
2486
|
+
if (shaaZmanisMga && jdate.Month === 1 && jdate.Day === 14 && Utils.isTimeAfter(sunrise, Utils.timeFromDate(date))) {
|
|
2487
|
+
zmanTimes.push({
|
|
2488
|
+
zmanType,
|
|
2489
|
+
time: Utils.addMinutes(
|
|
2490
|
+
sunrise,
|
|
2491
|
+
-90 + offset + shaaZmanisMga * 4
|
|
2492
|
+
)
|
|
2493
|
+
});
|
|
2494
|
+
}
|
|
2495
|
+
break;
|
|
2496
|
+
case ZmanTypeIds.SofZmanBurnChometz:
|
|
2497
|
+
if (shaaZmanisMga && jdate.Month === 1 && (jdate.Day === 14 || jdate.DayOfWeek === DaysOfWeek.FRIDAY && jdate.Day === 13) && Utils.isTimeAfter(sunrise, Utils.timeFromDate(date))) {
|
|
2498
|
+
zmanTimes.push({
|
|
2499
|
+
zmanType,
|
|
2500
|
+
time: Utils.addMinutes(
|
|
2501
|
+
sunrise,
|
|
2502
|
+
-90 + offset + shaaZmanisMga * 5
|
|
2503
|
+
)
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
break;
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
return zmanTimes;
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* Get the WhichDaysFlags for the given secular date
|
|
2513
|
+
* @param {Date} date
|
|
2514
|
+
* @param {jDate} jdate
|
|
2515
|
+
* @param {Location} location
|
|
2516
|
+
*/
|
|
2517
|
+
static getWhichDays(date, jdate, location) {
|
|
2518
|
+
if (jdate.isYomTov(!!location.Israel)) {
|
|
2519
|
+
return WhichDaysFlags.YOMTOV;
|
|
2520
|
+
}
|
|
2521
|
+
switch (date.getDay()) {
|
|
2522
|
+
case DaysOfWeek.SUNDAY:
|
|
2523
|
+
return WhichDaysFlags.SUNDAY;
|
|
2524
|
+
case DaysOfWeek.MONDAY:
|
|
2525
|
+
return WhichDaysFlags.MONDAY;
|
|
2526
|
+
case DaysOfWeek.TUESDAY:
|
|
2527
|
+
return WhichDaysFlags.TUESDAY;
|
|
2528
|
+
case DaysOfWeek.WEDNESDAY:
|
|
2529
|
+
return WhichDaysFlags.WEDNESDAY;
|
|
2530
|
+
case DaysOfWeek.THURSDAY:
|
|
2531
|
+
return WhichDaysFlags.THURSDAY;
|
|
2532
|
+
case DaysOfWeek.FRIDAY:
|
|
2533
|
+
return WhichDaysFlags.FRIDAY;
|
|
2534
|
+
case DaysOfWeek.SHABBOS:
|
|
2535
|
+
return WhichDaysFlags.SHABBOS;
|
|
2536
|
+
}
|
|
2537
|
+
return 0;
|
|
2538
|
+
}
|
|
2539
|
+
/**
|
|
2540
|
+
* Returns the zmanim necessary for showing basic shul notifications: chatzosHayom, chatzosHalayla, alos
|
|
2541
|
+
* @param {jDate|Date} date
|
|
2542
|
+
* @param {Location} location
|
|
2543
|
+
* @returns {{chatzosHayom:Time, chatzosHalayla:Time, alos:Time, shkia:Time }}
|
|
2544
|
+
*/
|
|
2545
|
+
static getBasicShulZmanim(date, location) {
|
|
2546
|
+
const { sdate, jdate } = Utils.bothDates(date);
|
|
2547
|
+
const zmanim = _ZmanimUtils.getZmanTimes(
|
|
2548
|
+
[
|
|
2549
|
+
getZmanType(ZmanTypeIds.chatzosDay),
|
|
2550
|
+
//Chatzos hayom
|
|
2551
|
+
getZmanType(ZmanTypeIds.Alos90),
|
|
2552
|
+
//alos90
|
|
2553
|
+
getZmanType(ZmanTypeIds.shkiaElevation),
|
|
2554
|
+
//shkiaElevation,
|
|
2555
|
+
getZmanType(ZmanTypeIds.candleLighting)
|
|
2556
|
+
//candleLighting,
|
|
2557
|
+
],
|
|
2558
|
+
sdate,
|
|
2559
|
+
jdate,
|
|
2560
|
+
location
|
|
2561
|
+
);
|
|
2562
|
+
return {
|
|
2563
|
+
chatzosHayom: zmanim[0].time,
|
|
2564
|
+
chatzosHalayla: Utils.addMinutes(zmanim[0].time, 720),
|
|
2565
|
+
alos: zmanim[1].time,
|
|
2566
|
+
shkia: zmanim[2].time
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* Returns all the zmanim for the given day
|
|
2571
|
+
* @param {Date|jDate} date
|
|
2572
|
+
* @param {Location} location
|
|
2573
|
+
* @returns {{zmanType:ZmanToShow, time?:Time }[]}
|
|
2574
|
+
*/
|
|
2575
|
+
static getAllZmanim(date, location) {
|
|
2576
|
+
const { sdate, jdate } = Utils.bothDates(date);
|
|
2577
|
+
return _ZmanimUtils.getZmanTimes(ZmanTypes, sdate, jdate, location);
|
|
2578
|
+
}
|
|
2579
|
+
};
|
|
2580
|
+
_ZmanimUtils.zmanTimesCache = [];
|
|
2581
|
+
var ZmanimUtils = _ZmanimUtils;
|
|
2582
|
+
|
|
2583
|
+
// src/Notifications.ts
|
|
2584
|
+
var dayNotes = [];
|
|
2585
|
+
var tefillahNotes = [];
|
|
2586
|
+
var showEnglish = false;
|
|
2587
|
+
var dayInfo;
|
|
2588
|
+
var showGaonShirShelYom = true;
|
|
2589
|
+
var israel = true;
|
|
2590
|
+
function getNotifications(date, time, location, english, showGaonShir, showDafYomi) {
|
|
2591
|
+
const { sdate, jdate } = Utils.bothDates(date);
|
|
2592
|
+
dayNotes.length = 0;
|
|
2593
|
+
tefillahNotes.length = 0;
|
|
2594
|
+
const month = jdate.Month, day = jdate.Day, dow = jdate.DayOfWeek, { chatzosHayom, chatzosHalayla, alos, shkia } = ZmanimUtils.getBasicShulZmanim(date, location), isAfterChatzosHayom = Utils.isTimeAfter(chatzosHayom, time), isAfterChatzosHalayla = typeof chatzosHalayla !== "undefined" && (Utils.isTimeAfter(chatzosHalayla, time) || chatzosHalayla.hour > 12 && time.hour < 12), isAfterAlos = Utils.isTimeAfter(alos, time), isAfterShkia = Utils.isTimeAfter(shkia, time), isDaytime = isAfterAlos && !isAfterShkia, isNightTime = !isDaytime, isNotBeinHasmashos = !isAfterShkia || Utils.isTimeAfter(Utils.addMinutes(shkia, 18), time), isMorning = isDaytime && !isAfterChatzosHayom, isAfternoon = isDaytime && isAfterChatzosHayom, isYomTov = jdate.isYomTovOrCholHamoed(location.Israel), isLeapYear = jDate.isJdLeapY(jdate.Year), noTachnun = isAfternoon && (dow === DaysOfWeek.FRIDAY || day === 29);
|
|
2595
|
+
dayInfo = {
|
|
2596
|
+
jdate,
|
|
2597
|
+
sdate,
|
|
2598
|
+
month,
|
|
2599
|
+
day,
|
|
2600
|
+
dow,
|
|
2601
|
+
isAfterChatzosHayom,
|
|
2602
|
+
isAfterChatzosHalayla,
|
|
2603
|
+
isAfterAlos,
|
|
2604
|
+
isAfterShkia,
|
|
2605
|
+
isDaytime,
|
|
2606
|
+
isNightTime,
|
|
2607
|
+
isMorning,
|
|
2608
|
+
isAfternoon,
|
|
2609
|
+
isYomTov,
|
|
2610
|
+
isLeapYear,
|
|
2611
|
+
noTachnun,
|
|
2612
|
+
location
|
|
2613
|
+
};
|
|
2614
|
+
showEnglish = english;
|
|
2615
|
+
israel = location.Israel;
|
|
2616
|
+
showGaonShirShelYom = typeof showGaonShir === "undefined" ? israel : !!showGaonShir;
|
|
2617
|
+
if (dow === DaysOfWeek.SHABBOS) {
|
|
2618
|
+
getShabbosNotifications();
|
|
2619
|
+
} else {
|
|
2620
|
+
getWeekDayNotifications();
|
|
2621
|
+
}
|
|
2622
|
+
getAroundTheYearNotifications();
|
|
2623
|
+
if (dayInfo.noTachnun && isDaytime && !isYomTov) {
|
|
2624
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
2625
|
+
addTefillahNote("No Tachnun", '\u05D0"\u05D0 \u05EA\u05D7\u05E0\u05D5\u05DF');
|
|
2626
|
+
} else if (isAfternoon) {
|
|
2627
|
+
addTefillahNote("No Tzidkascha", '\u05D0"\u05D0 \u05E6\u05D3\u05E7\u05EA\u05DA');
|
|
2628
|
+
} else if (!(month === JewishMonthsNames.NISSAN && day > 21 || month === JewishMonthsNames.IYAR || month === JewishMonthsNames.SIVAN && day < 6)) {
|
|
2629
|
+
addTefillahNote("No Av Harachamim", '\u05D0"\u05D0 \u05D0\u05D1 \u05D4\u05E8\u05D7\u05DE\u05D9\u05DD');
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
if (showDafYomi !== false) {
|
|
2633
|
+
addDayNote(jdate.getDafYomi(), jdate.getDafyomiHeb());
|
|
2634
|
+
}
|
|
2635
|
+
if (isNotBeinHasmashos && (month === JewishMonthsNames.NISSAN && day > 15 || month === JewishMonthsNames.IYAR || month === JewishMonthsNames.SIVAN && day < 6)) {
|
|
2636
|
+
const dayOfSefirah = jdate.getDayOfOmer();
|
|
2637
|
+
if (dayOfSefirah > 0) {
|
|
2638
|
+
addTefillahNote(Utils.getOmerNusach(dayOfSefirah, "ashkenaz"));
|
|
2639
|
+
}
|
|
2640
|
+
}
|
|
2641
|
+
return {
|
|
2642
|
+
dayNotes: [...new Set(dayNotes)],
|
|
2643
|
+
tefillahNotes: [...new Set(tefillahNotes)]
|
|
2644
|
+
};
|
|
2645
|
+
}
|
|
2646
|
+
function getShabbosNotifications() {
|
|
2647
|
+
const { month, day, isLeapYear, isMorning, isYomTov, jdate, isDaytime, isAfternoon } = dayInfo;
|
|
2648
|
+
if (month === JewishMonthsNames.NISSAN && day > 7 && day < 15) {
|
|
2649
|
+
addDayNote("Shabbos Hagadol", "\u05E9\u05D1\u05EA \u05D4\u05D2\u05D3\u05D5\u05DC");
|
|
2650
|
+
} else if (month === JewishMonthsNames.TISHREI && day > 2 && day < 10) {
|
|
2651
|
+
addDayNote("Shabbos Shuva", "\u05E9\u05D1\u05EA \u05E9\u05D5\u05D1\u05D4");
|
|
2652
|
+
} else if (month === JewishMonthsNames.AV && day > 2 && day < 10) {
|
|
2653
|
+
addDayNote("Shabbos Chazon", "\u05E9\u05D1\u05EA \u05D7\u05D6\u05D5\u05DF");
|
|
2654
|
+
} else if (month === (isLeapYear ? JewishMonthsNames.ADAR : JewishMonthsNames.SHVAT) && day > 24 || month === (isLeapYear ? JewishMonthsNames.ADAR_SHEINI : JewishMonthsNames.ADAR) && day === 1) {
|
|
2655
|
+
addDayNote("Parshas Shkalim", "\u05E4\u05E8\u05E9\u05EA \u05E9\u05E7\u05DC\u05D9\u05DD");
|
|
2656
|
+
} else if (month === (isLeapYear ? JewishMonthsNames.ADAR_SHEINI : JewishMonthsNames.ADAR) && day > 7 && day < 14) {
|
|
2657
|
+
addDayNote("Parshas Zachor", "\u05E4\u05E8\u05E9\u05EA \u05D6\u05DB\u05D5\u05E8");
|
|
2658
|
+
} else if (month === (isLeapYear ? JewishMonthsNames.ADAR_SHEINI : JewishMonthsNames.ADAR) && day > 16 && day < 24) {
|
|
2659
|
+
addDayNote("Parshas Parah", "\u05E4\u05E8\u05E9\u05EA \u05E4\u05E8\u05D4");
|
|
2660
|
+
} else if (month === (isLeapYear ? JewishMonthsNames.ADAR_SHEINI : JewishMonthsNames.ADAR) && day > 23 && day < 30 || month === JewishMonthsNames.NISSAN && day === 1) {
|
|
2661
|
+
addDayNote("Parshas Hachodesh", "\u05E4\u05E8\u05E9\u05EA \u05D4\u05D7\u05D5\u05D3\u05E9");
|
|
2662
|
+
}
|
|
2663
|
+
if (isMorning && !isYomTov) {
|
|
2664
|
+
const sedra = jdate.getSedra(israel);
|
|
2665
|
+
if (sedra.sedras.length > 0) {
|
|
2666
|
+
addTefillahNote(
|
|
2667
|
+
`Kriyas Hatorah Parshas ${sedra.toString()}`,
|
|
2668
|
+
`\u05E7\u05D4"\u05EA \u05E4\u05E8\u05E9\u05EA ${sedra.toStringHeb()}`
|
|
2669
|
+
);
|
|
2670
|
+
}
|
|
2671
|
+
if (month !== JewishMonthsNames.ELLUL && day > 22 && day < 30) {
|
|
2672
|
+
const nextMonth = jdate.addMonths(1);
|
|
2673
|
+
addTefillahNote(
|
|
2674
|
+
"The molad will be " + Molad.getString(nextMonth.Year, nextMonth.Month),
|
|
2675
|
+
"\u05D4\u05DE\u05D5\u05DC\u05D3 \u05D9\u05D4\u05D9\u05D4 \u05D1" + Molad.getStringHeb(nextMonth.Year, nextMonth.Month)
|
|
2676
|
+
);
|
|
2677
|
+
addTefillahNote("Bircas Hachodesh", "\u05DE\u05D1\u05E8\u05DB\u05D9\u05DD \u05D4\u05D7\u05D5\u05D3\u05E9");
|
|
2678
|
+
if (month !== JewishMonthsNames.NISSAN && month !== JewishMonthsNames.IYAR) {
|
|
2679
|
+
addTefillahNote("No Av Harachamim", '\u05D0"\u05D0 \u05D0\u05D1 \u05D4\u05E8\u05D7\u05DE\u05D9\u05DD');
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
if (month !== JewishMonthsNames.TISHREI && (day === 1 || day === 30)) {
|
|
2684
|
+
addDayNote("Rosh Chodesh", "\u05E8\u05D0\u05E9 \u05D7\u05D5\u05D3\u05E9");
|
|
2685
|
+
addTefillahNote("Ya`aleh Viyavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2686
|
+
if (showGaonShirShelYom && isDaytime) {
|
|
2687
|
+
addTefillahNote("Barchi Nafshi", '\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7\u05D9"\u05D3 - \u05D1\u05E8\u05DB\u05D9 \u05E0\u05E4\u05E9\u05D9');
|
|
2688
|
+
}
|
|
2689
|
+
if (isDaytime && month !== JewishMonthsNames.TEVES && !(month === JewishMonthsNames.KISLEV && day === 30)) {
|
|
2690
|
+
addTefillahNote("Chatzi Hallel", "\u05D7\u05E6\u05D9 \u05D4\u05DC\u05DC");
|
|
2691
|
+
}
|
|
2692
|
+
addTefillahNote("No Av Harachamim", '\u05D0"\u05D0 \u05D0\u05D1 \u05D4\u05E8\u05D7\u05DE\u05D9\u05DD');
|
|
2693
|
+
} else if (isYomTov) {
|
|
2694
|
+
addTefillahNote("No Av Harachamim", '\u05D0"\u05D0 \u05D0\u05D1 \u05D4\u05E8\u05D7\u05DE\u05D9\u05DD');
|
|
2695
|
+
if (showGaonShirShelYom && isDaytime) {
|
|
2696
|
+
addTefillahNote("\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05DE\u05D6\u05DE\u05D5\u05E8 \u05E9\u05D9\u05E8 \u05DC\u05D9\u05D5\u05DD \u05D4\u05E9\u05D1\u05EA");
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
if (isAfternoon && !(month === JewishMonthsNames.TISHREI && day === 10)) {
|
|
2700
|
+
const sedra = jdate.addDays(1).getSedra(israel);
|
|
2701
|
+
addTefillahNote(
|
|
2702
|
+
"Kriyas Hatorah Mincha Parshas " + sedra.sedras[0].eng,
|
|
2703
|
+
'\u05E7\u05D4"\u05EA \u05D1\u05DE\u05E0\u05D7\u05D4 \u05E4\u05E8\u05E9\u05EA ' + sedra.sedras[0].heb
|
|
2704
|
+
);
|
|
2705
|
+
}
|
|
2706
|
+
if (isAfternoon && (month === JewishMonthsNames.NISSAN && day > 21 || month <= JewishMonthsNames.ELLUL && !(month === JewishMonthsNames.AV && [8, 9].includes(day)))) {
|
|
2707
|
+
const prakim = PirkeiAvos.getPrakim(jdate, israel);
|
|
2708
|
+
if (prakim.length > 0) {
|
|
2709
|
+
addDayNote(
|
|
2710
|
+
"Pirkei Avos - " + prakim.map((s) => `Perek ${Utils.toJewishNumber(s)}`).join(" and "),
|
|
2711
|
+
"\u05E4\u05E8\u05E7\u05D9 \u05D0\u05D1\u05D5\u05EA - " + prakim.map((s) => `\u05E4\u05E8\u05E7 ${Utils.toJewishNumber(s)}`).join(" \u05D5")
|
|
2712
|
+
);
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
function getWeekDayNotifications() {
|
|
2717
|
+
const {
|
|
2718
|
+
isNightTime,
|
|
2719
|
+
dow,
|
|
2720
|
+
isYomTov,
|
|
2721
|
+
month,
|
|
2722
|
+
day,
|
|
2723
|
+
isMorning,
|
|
2724
|
+
jdate,
|
|
2725
|
+
location,
|
|
2726
|
+
isDaytime,
|
|
2727
|
+
isAfternoon
|
|
2728
|
+
} = dayInfo;
|
|
2729
|
+
if (isNightTime && dow === DaysOfWeek.SUNDAY) {
|
|
2730
|
+
addTefillahNote(
|
|
2731
|
+
month === JewishMonthsNames.NISSAN && day === 15 || month === JewishMonthsNames.SIVAN && day === 6 ? "\u05D5\u05EA\u05D5\u05D3\u05D9\u05E2\u05D9\u05E0\u05D5" : "\u05D0\u05EA\u05D4 \u05D7\u05D5\u05E0\u05E0\u05EA\u05E0\u05D5"
|
|
2732
|
+
);
|
|
2733
|
+
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) {
|
|
2734
|
+
addTefillahNote("No Vihi Noam", '\u05D0"\u05D0 \u05D5\u05D9\u05D4\u05D9 \u05E0\u05D5\u05E2\u05DD');
|
|
2735
|
+
}
|
|
2736
|
+
} else if (isNightTime && (month === JewishMonthsNames.NISSAN && (day === 16 || day === 22) || month === JewishMonthsNames.SIVAN && day === 7 || month === JewishMonthsNames.TISHREI && [3, 11, 16, 23].includes(day))) {
|
|
2737
|
+
addTefillahNote("Ata Chonantanu", "\u05D0\u05EA\u05D4 \u05D7\u05D5\u05E0\u05E0\u05EA\u05E0\u05D5");
|
|
2738
|
+
}
|
|
2739
|
+
if (isMorning && !isYomTov && (dow === DaysOfWeek.MONDAY || dow === DaysOfWeek.THURSDAY) && !hasOwnKriyasHatorah(jdate, location)) {
|
|
2740
|
+
const sedra = jdate.getSedra(israel);
|
|
2741
|
+
if (sedra.sedras.length > 0) {
|
|
2742
|
+
addTefillahNote(
|
|
2743
|
+
`Kriyas Hatorah Parshas ${sedra.sedras[0].eng}`,
|
|
2744
|
+
`\u05E7\u05D4"\u05EA \u05E4\u05E8\u05E9\u05EA ${sedra.sedras[0].heb}`
|
|
2745
|
+
);
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
if (month !== JewishMonthsNames.TISHREI && day === 1 || day === 30) {
|
|
2749
|
+
dayInfo.noTachnun = true;
|
|
2750
|
+
addDayNote("Rosh Chodesh", "\u05E8\u05D0\u05E9 \u05D7\u05D5\u05D3\u05E9");
|
|
2751
|
+
addTefillahNote("Ya`aleh Viyavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2752
|
+
if (showGaonShirShelYom && isDaytime) {
|
|
2753
|
+
addTefillahNote("Barchi Nafshi", '\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7\u05D9"\u05D3 - \u05D1\u05E8\u05DB\u05D9 \u05E0\u05E4\u05E9\u05D9');
|
|
2754
|
+
}
|
|
2755
|
+
if (isDaytime && month !== JewishMonthsNames.TEVES && !(month === JewishMonthsNames.KISLEV && day === 30)) {
|
|
2756
|
+
addTefillahNote("Chatzi Hallel", "\u05D7\u05E6\u05D9 \u05D4\u05DC\u05DC");
|
|
2757
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS) {
|
|
2758
|
+
noLaminatzeach();
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
} else if (month !== JewishMonthsNames.ELLUL && (dow < DaysOfWeek.FRIDAY && day === 29 || dow === DaysOfWeek.THURSDAY && day === 28) && isAfternoon) {
|
|
2762
|
+
addTefillahNote("Yom Kippur Kattan", '\u05D9\u05D5"\u05DB \u05E7\u05D8\u05DF');
|
|
2763
|
+
}
|
|
2764
|
+
if (jdate.hasEiruvTavshilin(israel)) {
|
|
2765
|
+
addDayNote("Eruv Tavshilin", "\u05E2\u05D9\u05E8\u05D5\u05D1 \u05EA\u05D1\u05E9\u05D9\u05DC\u05D9\u05DF");
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
function getAroundTheYearNotifications() {
|
|
2769
|
+
const {
|
|
2770
|
+
month,
|
|
2771
|
+
day,
|
|
2772
|
+
isNightTime,
|
|
2773
|
+
dow,
|
|
2774
|
+
isAfternoon,
|
|
2775
|
+
isDaytime,
|
|
2776
|
+
isMorning,
|
|
2777
|
+
isAfterChatzosHalayla,
|
|
2778
|
+
jdate,
|
|
2779
|
+
sdate,
|
|
2780
|
+
isLeapYear,
|
|
2781
|
+
location
|
|
2782
|
+
} = dayInfo;
|
|
2783
|
+
let showVsainTalUmatarInChul = false;
|
|
2784
|
+
if (!location.Israel && sdate.getMonth() === 11 && sdate.getDate() > 4) {
|
|
2785
|
+
const startVsainTalUmatar = jdate.Year % 4 === 0 ? 6 : 5;
|
|
2786
|
+
showVsainTalUmatarInChul = sdate.getDate() >= startVsainTalUmatar && sdate.getDate() <= startVsainTalUmatar + 14;
|
|
2787
|
+
}
|
|
2788
|
+
switch (month) {
|
|
2789
|
+
case JewishMonthsNames.NISSAN:
|
|
2790
|
+
dayInfo.noTachnun = true;
|
|
2791
|
+
if (day > 15) {
|
|
2792
|
+
addTefillahNote("Morid Hatal", "\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D4\u05D8\u05DC");
|
|
2793
|
+
}
|
|
2794
|
+
if (dow !== DaysOfWeek.SHABBOS && day > 15 && day !== 21) {
|
|
2795
|
+
addTefillahNote("Vesain Bracha", "\u05D5\u05EA\u05DF \u05D1\u05E8\u05DB\u05D4");
|
|
2796
|
+
}
|
|
2797
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS && [14, 16, 17, 18, 19, 20].includes(day)) {
|
|
2798
|
+
addTefillahNote("No Mizmor Lesodah", '\u05D0"\u05D0 \u05DE\u05D6\u05DE\u05D5\u05E8 \u05DC\u05EA\u05D5\u05D3\u05D4');
|
|
2799
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
2800
|
+
noLaminatzeach();
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
if (day === 15) {
|
|
2804
|
+
addDayNote("First Day of Pesach", '\u05D9\u05D5"\u05D8 \u05E8\u05D0\u05E9\u05D5\u05DF \u05E9\u05DC \u05E4\u05E1\u05D7');
|
|
2805
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
2806
|
+
if (isAfternoon) {
|
|
2807
|
+
addTefillahNote("Morid Hatal", "\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D4\u05D8\u05DC");
|
|
2808
|
+
}
|
|
2809
|
+
if (showGaonShirShelYom && isDaytime && dow !== DaysOfWeek.SHABBOS) {
|
|
2810
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7\u05D9"\u05D3 - \u05D1\u05E6\u05D0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC');
|
|
2811
|
+
}
|
|
2812
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2813
|
+
} else if (day === 16 && !israel) {
|
|
2814
|
+
addDayNote("Second Day of Pesach", '\u05D9\u05D5"\u05D8 \u05E9\u05E0\u05D9 \u05E9\u05DC \u05E4\u05E1\u05D7');
|
|
2815
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
2816
|
+
addTefillahNote("Morid Hatal", "\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D4\u05D8\u05DC");
|
|
2817
|
+
if (showGaonShirShelYom && isDaytime && dow !== DaysOfWeek.SHABBOS) {
|
|
2818
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7\u05D9"\u05D3 - \u05D1\u05E6\u05D0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC');
|
|
2819
|
+
}
|
|
2820
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2821
|
+
} else if ([16, 17, 18, 19, 20, 21].includes(day)) {
|
|
2822
|
+
if (day === 21) {
|
|
2823
|
+
addDayNote("Shvi`i Shel Pesach", "\u05E9\u05D1\u05D9\u05E2\u05D9 \u05E9\u05DC \u05E4\u05DD\u05D7");
|
|
2824
|
+
if (isDaytime) {
|
|
2825
|
+
if (israel) {
|
|
2826
|
+
addTefillahNote("Yizkor", "\u05D9\u05D6\u05DB\u05D5\u05E8");
|
|
2827
|
+
}
|
|
2828
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
2829
|
+
addTefillahNote(`\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05D9"\u05D7 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05DC\u05E2\u05D1\u05D3 \u05D4'`);
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
} else {
|
|
2833
|
+
addDayNote("Chol Ha`moed Pesach", "\u05E4\u05E1\u05D7 - \u05D7\u05D5\u05DC \u05D4\u05DE\u05D5\u05E2\u05D3");
|
|
2834
|
+
addTefillahNote("Ya`aleh Viyavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2835
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS)
|
|
2836
|
+
noLaminatzeach();
|
|
2837
|
+
if (showGaonShirShelYom && isDaytime && dow !== DaysOfWeek.SHABBOS) {
|
|
2838
|
+
switch (day) {
|
|
2839
|
+
case 16:
|
|
2840
|
+
if (dow === DaysOfWeek.SUNDAY) {
|
|
2841
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7\u05D9"\u05D3 - \u05D1\u05E6\u05D0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC');
|
|
2842
|
+
} else {
|
|
2843
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E2"\u05D7 - \u05DE\u05E9\u05DB\u05D9\u05DC \u05DC\u05D0\u05E1\u05E3');
|
|
2844
|
+
}
|
|
2845
|
+
break;
|
|
2846
|
+
case 17:
|
|
2847
|
+
if (dow === DaysOfWeek.MONDAY) {
|
|
2848
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E2"\u05D7 - \u05DE\u05E9\u05DB\u05D9\u05DC \u05DC\u05D0\u05E1\u05E3');
|
|
2849
|
+
} else {
|
|
2850
|
+
addTefillahNote("\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E4' - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05D0\u05DC \u05E9\u05D5\u05E9\u05E0\u05D9\u05DD");
|
|
2851
|
+
}
|
|
2852
|
+
break;
|
|
2853
|
+
case 18:
|
|
2854
|
+
if (dow === DaysOfWeek.TUESDAY || dow === DaysOfWeek.SUNDAY) {
|
|
2855
|
+
addTefillahNote("\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E4' - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05D0\u05DC \u05E9\u05D5\u05E9\u05E0\u05D9\u05DD");
|
|
2856
|
+
} else {
|
|
2857
|
+
addTefillahNote(`\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7"\u05D4 - \u05D4\u05D5\u05D3\u05D5 \u05DC\u05D4'`);
|
|
2858
|
+
}
|
|
2859
|
+
break;
|
|
2860
|
+
case 19:
|
|
2861
|
+
if (dow === DaysOfWeek.THURSDAY) {
|
|
2862
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7\u05DC"\u05D4 - \u05D4\u05DC\u05DC\u05D5\u05D9-\u05D4 \u05D4\u05DC\u05DC\u05D5 \u05D0\u05EA \u05E9\u05DD');
|
|
2863
|
+
} else {
|
|
2864
|
+
addTefillahNote(`\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7"\u05D4 - \u05D4\u05D5\u05D3\u05D5 \u05DC\u05D4'`);
|
|
2865
|
+
}
|
|
2866
|
+
break;
|
|
2867
|
+
case 20:
|
|
2868
|
+
if (dow === DaysOfWeek.FRIDAY) {
|
|
2869
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E1"\u05D5 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E9\u05D9\u05E8 \u05DE\u05D6\u05DE\u05D5\u05E8');
|
|
2870
|
+
} else {
|
|
2871
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E7\u05DC"\u05D4 - \u05D4\u05DC\u05DC\u05D5\u05D9-\u05D4 \u05D4\u05DC\u05DC\u05D5 \u05D0\u05EA \u05E9\u05DD');
|
|
2872
|
+
}
|
|
2873
|
+
break;
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
if (isDaytime)
|
|
2878
|
+
addTefillahNote("Half Hallel", "\u05D7\u05E6\u05D9 \u05D4\u05DC\u05DC");
|
|
2879
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2880
|
+
}
|
|
2881
|
+
if (day === 22) {
|
|
2882
|
+
if (israel) {
|
|
2883
|
+
addDayNote("Isru Chag", "\u05D0\u05D9\u05E1\u05E8\u05D5 \u05D7\u05D2");
|
|
2884
|
+
} else {
|
|
2885
|
+
addDayNote("Acharon Shel Pesach", "\u05D0\u05D7\u05E8\u05D5\u05DF \u05E9\u05DC \u05E4\u05E1\u05D7");
|
|
2886
|
+
if (isDaytime) {
|
|
2887
|
+
addTefillahNote("Yizkor", "\u05D9\u05D6\u05DB\u05D5\u05E8");
|
|
2888
|
+
addTefillahNote("Half Hallel", "\u05D7\u05E6\u05D9 \u05D4\u05DC\u05DC");
|
|
2889
|
+
}
|
|
2890
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2891
|
+
}
|
|
2892
|
+
if (dow !== DaysOfWeek.SHABBOS && isMorning) {
|
|
2893
|
+
noLaminatzeach();
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
if (dow === DaysOfWeek.SHABBOS && ([15, 16, 17, 18, 19, 20, 21].includes(day) || !israel && day === 22)) {
|
|
2897
|
+
addTefillahNote("Shir Hashirim", "\u05DE\u05D2\u05D9\u05DC\u05EA \u05E9\u05D9\u05E8 \u05D4\u05E9\u05D9\u05E8\u05D9\u05DD");
|
|
2898
|
+
}
|
|
2899
|
+
break;
|
|
2900
|
+
case JewishMonthsNames.IYAR:
|
|
2901
|
+
if (day <= 15) {
|
|
2902
|
+
addTefillahNote("Morid Hatal", "\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D4\u05D8\u05DC");
|
|
2903
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
2904
|
+
addTefillahNote("V`sain Bracha", "\u05D5\u05EA\u05DF \u05D1\u05E8\u05DB\u05D4");
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2907
|
+
if (day === 14 || day === 13 && isAfternoon || day === 18 || day === 17 && isAfternoon) {
|
|
2908
|
+
dayInfo.noTachnun = true;
|
|
2909
|
+
if (day === 14) {
|
|
2910
|
+
addDayNote("Pesach Sheini", "\u05E4\u05E1\u05D7 \u05E9\u05E0\u05D9");
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
if (isMorning && (dow === DaysOfWeek.MONDAY && day > 3 && day < 13 || dow === DaysOfWeek.THURSDAY && day > 6 && day < 14 || dow === DaysOfWeek.MONDAY && day > 10 && day < 18 && day !== 14)) {
|
|
2914
|
+
addTefillahNote("Ba`hab", '\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA \u05D1\u05D4"\u05D1');
|
|
2915
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
2916
|
+
}
|
|
2917
|
+
break;
|
|
2918
|
+
case JewishMonthsNames.SIVAN:
|
|
2919
|
+
if (day < 13) {
|
|
2920
|
+
dayInfo.noTachnun = true;
|
|
2921
|
+
}
|
|
2922
|
+
if (day === 6) {
|
|
2923
|
+
addDayNote("Shavuos", "\u05D9\u05D5\u05DD \u05D8\u05D5\u05D1 \u05E9\u05DC \u05E9\u05D1\u05D5\u05E2\u05D5\u05EA");
|
|
2924
|
+
if (isDaytime) {
|
|
2925
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
2926
|
+
addTefillahNote("Megilas Rus", "\u05DE\u05D2\u05D9\u05DC\u05EA \u05E8\u05D5\u05EA");
|
|
2927
|
+
addTefillahNote("Akdamus", "\u05D0\u05E7\u05D3\u05DE\u05D5\u05EA");
|
|
2928
|
+
if (israel)
|
|
2929
|
+
addTefillahNote("Yizkor", "\u05D9\u05D6\u05DB\u05D5\u05E8");
|
|
2930
|
+
if (showGaonShirShelYom) {
|
|
2931
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05D9"\u05D8 - ..\u05D4\u05E9\u05DE\u05D9\u05DD \u05DE\u05E1\u05E4\u05E8\u05D9\u05DD..');
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2935
|
+
} else if (day === 7) {
|
|
2936
|
+
if (israel) {
|
|
2937
|
+
addDayNote("Issru Chag", "\u05D0\u05D9\u05E1\u05E8\u05D5 \u05D7\u05D2");
|
|
2938
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS) {
|
|
2939
|
+
noLaminatzeach();
|
|
2940
|
+
}
|
|
2941
|
+
} else {
|
|
2942
|
+
addDayNote("Shavuos Second Day", "\u05D9\u05D5\u05DD \u05D8\u05D5\u05D1 \u05E9\u05DC \u05E9\u05D1\u05D5\u05E2\u05D5\u05EA");
|
|
2943
|
+
if (isDaytime) {
|
|
2944
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
2945
|
+
addTefillahNote("Yizkor", "\u05D9\u05D6\u05DB\u05D5\u05E8");
|
|
2946
|
+
}
|
|
2947
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
break;
|
|
2951
|
+
case JewishMonthsNames.TAMUZ:
|
|
2952
|
+
if (isDaytime && (day === 17 && DaysOfWeek.SHABBOS !== 6 || day === 18 && dow === DaysOfWeek.SUNDAY)) {
|
|
2953
|
+
if (isDaytime) {
|
|
2954
|
+
addDayNote("Shiva Asar B`Tamuz", '\u05D9"\u05D6 \u05D1\u05EA\u05DE\u05D5\u05D6');
|
|
2955
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
2956
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
2957
|
+
}
|
|
2958
|
+
if (isMorning) {
|
|
2959
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
break;
|
|
2963
|
+
case JewishMonthsNames.AV:
|
|
2964
|
+
if (isAfternoon && day === 8 && dow !== DaysOfWeek.FRIDAY) {
|
|
2965
|
+
dayInfo.noTachnun = true;
|
|
2966
|
+
} else if (day === 9 && dow !== DaysOfWeek.SHABBOS || day === 10 && dow === DaysOfWeek.SUNDAY) {
|
|
2967
|
+
addDayNote("Tish B`Av", "\u05EA\u05E9\u05E2\u05D4 \u05D1\u05D0\u05D1");
|
|
2968
|
+
if (isDaytime) {
|
|
2969
|
+
addTefillahNote("Kinos", "\u05E7\u05D9\u05E0\u05D5\u05EA");
|
|
2970
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
2971
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS) {
|
|
2972
|
+
noLaminatzeach();
|
|
2973
|
+
}
|
|
2974
|
+
} else {
|
|
2975
|
+
addTefillahNote("Megilas Eicha", "\u05DE\u05D2\u05D9\u05DC\u05EA \u05D0\u05D9\u05DB\u05D4");
|
|
2976
|
+
if (isNightTime && dow === DaysOfWeek.SUNDAY) {
|
|
2977
|
+
addTefillahNote("No Vihi Noam", '\u05D0"\u05D0 \u05D5\u05D9\u05D4\u05D9 \u05E0\u05D5\u05E2\u05DD');
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
dayInfo.noTachnun = true;
|
|
2981
|
+
} else if (isAfternoon && day === 14) {
|
|
2982
|
+
dayInfo.noTachnun = true;
|
|
2983
|
+
} else if (day === 15) {
|
|
2984
|
+
addDayNote("Tu B`Av", '\u05D8"\u05D5 \u05D1\u05D0\u05D1');
|
|
2985
|
+
dayInfo.noTachnun = true;
|
|
2986
|
+
}
|
|
2987
|
+
break;
|
|
2988
|
+
case JewishMonthsNames.ELLUL:
|
|
2989
|
+
addTefillahNote("L`Dovid Hashem Ori", "\u05DC\u05D3\u05D5\u05D3 \u05D4");
|
|
2990
|
+
if (day > 20 && dow !== DaysOfWeek.SHABBOS && (isAfterChatzosHalayla || isMorning)) {
|
|
2991
|
+
let startedSelichos = day >= 26;
|
|
2992
|
+
if (day < 26) {
|
|
2993
|
+
const daysToRH = 30 - day, dowRH = (daysToRH + dow) % 7;
|
|
2994
|
+
switch (dowRH) {
|
|
2995
|
+
case DaysOfWeek.MONDAY:
|
|
2996
|
+
startedSelichos = day >= 22;
|
|
2997
|
+
break;
|
|
2998
|
+
case DaysOfWeek.TUESDAY:
|
|
2999
|
+
startedSelichos = day >= 21;
|
|
3000
|
+
break;
|
|
3001
|
+
case DaysOfWeek.SHABBOS:
|
|
3002
|
+
startedSelichos = day >= 24;
|
|
3003
|
+
break;
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
if (startedSelichos) {
|
|
3007
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
if (day === 29) {
|
|
3011
|
+
dayInfo.noTachnun = true;
|
|
3012
|
+
}
|
|
3013
|
+
break;
|
|
3014
|
+
case JewishMonthsNames.TISHREI:
|
|
3015
|
+
if (day < 11) {
|
|
3016
|
+
addTefillahNote("Hamelech Hakadosh", "\u05D4\u05DE\u05DC\u05DA \u05D4\u05E7\u05D3\u05D5\u05E9");
|
|
3017
|
+
if (dow !== DaysOfWeek.SHABBOS && day !== 9) {
|
|
3018
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
if (day > 4 && day < 10 && dow !== DaysOfWeek.SHABBOS) {
|
|
3022
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
3023
|
+
addTefillahNote("Hamelech Hamishpat", "\u05D4\u05DE\u05DC\u05DA \u05D4\u05DE\u05E9\u05E4\u05D8");
|
|
3024
|
+
}
|
|
3025
|
+
if (dow === DaysOfWeek.SHABBOS && day > 2 && day < 10) {
|
|
3026
|
+
addDayNote("Shabbos Shuva", "\u05E9\u05D1\u05EA \u05E9\u05D5\u05D1\u05D4");
|
|
3027
|
+
}
|
|
3028
|
+
if (day >= 10) {
|
|
3029
|
+
dayInfo.noTachnun = true;
|
|
3030
|
+
}
|
|
3031
|
+
switch (day) {
|
|
3032
|
+
case 1:
|
|
3033
|
+
addDayNote("Rosh Hashana", "\u05E8\u05D0\u05E9 \u05D4\u05E9\u05E0\u05D4");
|
|
3034
|
+
if (dow !== DaysOfWeek.SHABBOS && isDaytime) {
|
|
3035
|
+
addTefillahNote("Tekias Shofar", "\u05EA\u05E7\u05D9\u05E2\u05EA \u05E9\u05D5\u05E4\u05E8");
|
|
3036
|
+
if (showGaonShirShelYom) {
|
|
3037
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E4"\u05D0 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E2\u05DC \u05D4\u05D2\u05EA\u05D9\u05EA');
|
|
3038
|
+
}
|
|
3039
|
+
if (isAfternoon) {
|
|
3040
|
+
addDayNote("Tashlich", "\u05EA\u05E9\u05DC\u05D9\u05DA");
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3044
|
+
break;
|
|
3045
|
+
case 2:
|
|
3046
|
+
addDayNote("Rosh Hashana", "\u05E8\u05D0\u05E9 \u05D4\u05E9\u05E0\u05D4");
|
|
3047
|
+
if (isDaytime) {
|
|
3048
|
+
addTefillahNote("Tekias Shofar", "\u05EA\u05E7\u05D9\u05E2\u05EA \u05E9\u05D5\u05E4\u05E8");
|
|
3049
|
+
if (showGaonShirShelYom) {
|
|
3050
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E4"\u05D0 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E2\u05DC \u05D4\u05D2\u05EA\u05D9\u05EA');
|
|
3051
|
+
}
|
|
3052
|
+
if (dow === DaysOfWeek.SUNDAY && isAfternoon) {
|
|
3053
|
+
addDayNote("Tashlich", "\u05EA\u05E9\u05DC\u05D9\u05DA");
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3057
|
+
break;
|
|
3058
|
+
case 3:
|
|
3059
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
3060
|
+
if (isDaytime) {
|
|
3061
|
+
addDayNote("Fast of Tzom Gedalya", "\u05E6\u05D5\u05DD \u05D2\u05D3\u05DC\u05D9\u05D4");
|
|
3062
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
3063
|
+
}
|
|
3064
|
+
if (isAfterChatzosHalayla || isMorning) {
|
|
3065
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
3066
|
+
}
|
|
3067
|
+
addTefillahNote("Hamelech Hamishpat", "\u05D4\u05DE\u05DC\u05DA \u05D4\u05DE\u05E9\u05E4\u05D8");
|
|
3068
|
+
}
|
|
3069
|
+
break;
|
|
3070
|
+
case 4:
|
|
3071
|
+
if (dow === DaysOfWeek.SUNDAY) {
|
|
3072
|
+
if (isDaytime) {
|
|
3073
|
+
addDayNote("Fast of Tzom Gedalya", "\u05E6\u05D5\u05DD \u05D2\u05D3\u05DC\u05D9\u05D4");
|
|
3074
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
3075
|
+
}
|
|
3076
|
+
if (isAfterChatzosHalayla || isMorning) {
|
|
3077
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
3078
|
+
}
|
|
3079
|
+
addTefillahNote("Hamelech Hamishpat", "\u05D4\u05DE\u05DC\u05DA \u05D4\u05DE\u05E9\u05E4\u05D8");
|
|
3080
|
+
} else if (dow !== DaysOfWeek.SHABBOS) {
|
|
3081
|
+
addTefillahNote("Hamelech Hamishpat", "\u05D4\u05DE\u05DC\u05DA \u05D4\u05DE\u05E9\u05E4\u05D8");
|
|
3082
|
+
if (isAfterChatzosHalayla || isMorning) {
|
|
3083
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
break;
|
|
3087
|
+
case 9:
|
|
3088
|
+
addDayNote("Erev Yom Kippur", "\u05E2\u05E8\u05D1 \u05D9\u05D5\u05DD \u05DB\u05D9\u05E4\u05D5\u05E8");
|
|
3089
|
+
if (isMorning) {
|
|
3090
|
+
addTefillahNote("No Mizmor L`Sodah", '\u05D0"\u05D0 \u05DE\u05D6\u05DE\u05D5\u05E8 \u05DC\u05EA\u05D5\u05D3\u05D4');
|
|
3091
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
3092
|
+
noLaminatzeach();
|
|
3093
|
+
}
|
|
3094
|
+
if (dow === DaysOfWeek.FRIDAY) {
|
|
3095
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
3096
|
+
}
|
|
3097
|
+
} else if (isAfternoon) {
|
|
3098
|
+
addTefillahNote("Vidduy", "\u05D5\u05D3\u05D5\u05D9 \u05D1\u05E2\u05DE\u05D9\u05D3\u05D4");
|
|
3099
|
+
}
|
|
3100
|
+
if (isDaytime && dow !== DaysOfWeek.FRIDAY) {
|
|
3101
|
+
addTefillahNote("No Avinu Malkeinu", '\u05D0"\u05D0 \u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5');
|
|
3102
|
+
}
|
|
3103
|
+
dayInfo.noTachnun = true;
|
|
3104
|
+
break;
|
|
3105
|
+
case 10:
|
|
3106
|
+
addDayNote("Yom Kippur", "\u05D9\u05D5\u05DD \u05D4\u05DB\u05D9\u05E4\u05D5\u05E8\u05D9\u05DD");
|
|
3107
|
+
addDayNote("\u05DC\u05E4\u05E0\u05D9 \u05D4' \u05EA\u05D8\u05D4\u05E8\u05D5");
|
|
3108
|
+
if (isDaytime) {
|
|
3109
|
+
addTefillahNote("Yizkor", "\u05D9\u05D6\u05DB\u05D5\u05E8");
|
|
3110
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
3111
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05DC"\u05D1 - \u05DC\u05D3\u05D5\u05D3 \u05DE\u05E9\u05DB\u05D9\u05DC');
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
if (isAfternoon) {
|
|
3115
|
+
addTefillahNote('\u05E7\u05D4"\u05EA \u05D1\u05DE\u05E0\u05D7\u05D4 \u05E1\u05D5\u05E3 \u05E4\u05E8\u05E9\u05EA \u05D0\u05D7"\u05DE');
|
|
3116
|
+
}
|
|
3117
|
+
break;
|
|
3118
|
+
case 11:
|
|
3119
|
+
if (isNightTime) {
|
|
3120
|
+
addDayNote("\u05DC\u05DA \u05D0\u05DB\u05DC \u05D1\u05E9\u05DE\u05D7\u05D4 \u05DC\u05D7\u05DE\u05DA \u05DB\u05D9 \u05DB\u05D1\u05E8 \u05E8\u05E6\u05D4 \u05D4\u05D0\u05DC\u05E7\u05D9\u05DD \u05D0\u05EA \u05DE\u05E2\u05E9\u05D9\u05DA");
|
|
3121
|
+
}
|
|
3122
|
+
case 15:
|
|
3123
|
+
addDayNote("First day of Sukkos", '\u05D9\u05D5"\u05D8 \u05E8\u05D0\u05E9\u05D5\u05DF \u05E9\u05DC \u05E1\u05D5\u05DB\u05D5\u05EA');
|
|
3124
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3125
|
+
if (isDaytime) {
|
|
3126
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
3127
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
3128
|
+
addTefillahNote("Hoshanos - \u05DC\u05DE\u05E2\u05DF \u05D0\u05DE\u05EA\u05DA", "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA - \u05DC\u05DE\u05E2\u05DF \u05D0\u05DE\u05EA\u05DA");
|
|
3129
|
+
addTefillahNote("Kah Keli", "\u05E7\u05D4 \u05E7\u05DC\u05D9");
|
|
3130
|
+
if (showGaonShirShelYom) {
|
|
3131
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E2"\u05D5 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05D1\u05E0\u05D2\u05D9\u05E0\u05D5\u05EA \u05DE\u05D6\u05DE\u05D5\u05E8');
|
|
3132
|
+
}
|
|
3133
|
+
} else {
|
|
3134
|
+
addTefillahNote("Hoshanos - \u05D0\u05D5\u05DD \u05E0\u05E6\u05D5\u05E8\u05D4", "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA - \u05D0\u05D5\u05DD \u05E0\u05E6\u05D5\u05E8\u05D4");
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
break;
|
|
3138
|
+
case 16:
|
|
3139
|
+
case 17:
|
|
3140
|
+
case 18:
|
|
3141
|
+
case 19:
|
|
3142
|
+
case 20:
|
|
3143
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3144
|
+
if (day === 16 && !israel) {
|
|
3145
|
+
addDayNote("Second day of Sukkos", "\u05E1\u05D5\u05DB\u05D5\u05EA - \u05D9\u05D5\u05DD \u05D8\u05D5\u05D1 \u05E9\u05E0\u05D9");
|
|
3146
|
+
} else if (!israel) {
|
|
3147
|
+
addDayNote("Chol Hamoed Sukkos", "\u05E1\u05D5\u05DB\u05D5\u05EA - \u05D7\u05D5\u05DC \u05D4\u05DE\u05D5\u05E2\u05D3");
|
|
3148
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3149
|
+
}
|
|
3150
|
+
if (isDaytime) {
|
|
3151
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
3152
|
+
switch (day) {
|
|
3153
|
+
case 16:
|
|
3154
|
+
addTefillahNote(
|
|
3155
|
+
"\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA - " + (dow === DaysOfWeek.SUNDAY ? "\u05DC\u05DE\u05E2\u05DF \u05D0\u05DE\u05EA\u05DA" : "\u05D0\u05D1\u05DF \u05E9\u05EA\u05D9\u05D4")
|
|
3156
|
+
);
|
|
3157
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
3158
|
+
addTefillahNote(`\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05DB"\u05D8 - ..\u05D4\u05D1\u05D5 \u05DC\u05D4' \u05D1\u05E0\u05D9 \u05D0\u05DC\u05D9\u05DD`);
|
|
3159
|
+
}
|
|
3160
|
+
break;
|
|
3161
|
+
case 17:
|
|
3162
|
+
addTefillahNote(
|
|
3163
|
+
(showEnglish ? "Hoshanos" : "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA") + " - " + (dow === DaysOfWeek.SHABBOS ? "\u05D0\u05D5\u05DD \u05E0\u05E6\u05D5\u05E8\u05D4" : "\u05D0\u05E2\u05E8\u05D5\u05DA \u05E9\u05D5\u05E2\u05D9")
|
|
3164
|
+
);
|
|
3165
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
3166
|
+
addTefillahNote("\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E0' - \u05DE\u05D6\u05DE\u05D5\u05E8 \u05DC\u05D0\u05E1\u05E3");
|
|
3167
|
+
}
|
|
3168
|
+
break;
|
|
3169
|
+
case 18:
|
|
3170
|
+
if (dow === DaysOfWeek.SUNDAY) {
|
|
3171
|
+
addTefillahNote((showEnglish ? "Hoshanos" : "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA") + " - \u05D0\u05E2\u05E8\u05D5\u05DA \u05E9\u05D5\u05E2\u05D9");
|
|
3172
|
+
if (showGaonShirShelYom) {
|
|
3173
|
+
addTefillahNote("\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E0' - \u05DE\u05D6\u05DE\u05D5\u05E8 \u05DC\u05D0\u05E1\u05E3");
|
|
3174
|
+
}
|
|
3175
|
+
} else {
|
|
3176
|
+
if (dow === DaysOfWeek.TUESDAY) {
|
|
3177
|
+
addTefillahNote((showEnglish ? "Hoshanos" : "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA") + " - \u05D0\u05D1\u05DF \u05E9\u05EA\u05D9\u05D4");
|
|
3178
|
+
} else if (dow === DaysOfWeek.THURSDAY) {
|
|
3179
|
+
addTefillahNote(
|
|
3180
|
+
(showEnglish ? "Hoshanos" : "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA") + " - \u05D0\u05D5\u05DD \u05D0\u05E0\u05D9 \u05D7\u05D5\u05DE\u05D4"
|
|
3181
|
+
);
|
|
3182
|
+
} else if (dow === DaysOfWeek.FRIDAY) {
|
|
3183
|
+
addTefillahNote((showEnglish ? "Hoshanos" : "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA") + " - \u05D0-\u05DC \u05DC\u05DE\u05D5\u05E9\u05E2\u05D5\u05EA");
|
|
3184
|
+
}
|
|
3185
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
3186
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E6"\u05D3 - ..\u05DE\u05D9 \u05D9\u05E7\u05D5\u05DD \u05DC\u05D9..');
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
break;
|
|
3190
|
+
case 19:
|
|
3191
|
+
addTefillahNote(
|
|
3192
|
+
(showEnglish ? "Hoshanos" : "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA") + " - " + (dow === DaysOfWeek.SHABBOS ? "\u05D0\u05D5\u05DD \u05E0\u05E6\u05D5\u05E8\u05D4" : "\u05D0-\u05DC \u05DC\u05DE\u05D5\u05E9\u05E2\u05D5\u05EA")
|
|
3193
|
+
);
|
|
3194
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
3195
|
+
if (dow === DaysOfWeek.MONDAY) {
|
|
3196
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E6"\u05D3 - ..\u05DE\u05D9 \u05D9\u05E7\u05D5\u05DD \u05DC\u05D9..');
|
|
3197
|
+
} else {
|
|
3198
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E6"\u05D3 - \u05D0-\u05DC \u05E0\u05E7\u05DE\u05D5\u05EA.. \u05D9\u05E9\u05E8\u05D9 \u05DC\u05D1');
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
break;
|
|
3202
|
+
case 20:
|
|
3203
|
+
addTefillahNote(
|
|
3204
|
+
(showEnglish ? "Hoshanos" : "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA") + " - " + (dow === DaysOfWeek.SHABBOS ? "\u05D0\u05D5\u05DD \u05E0\u05E6\u05D5\u05E8\u05D4" : "\u05D0\u05D3\u05D5\u05DF \u05D4\u05DE\u05D5\u05E9\u05D9\u05E2")
|
|
3205
|
+
);
|
|
3206
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
3207
|
+
if (dow === DaysOfWeek.THURSDAY) {
|
|
3208
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E4"\u05D0 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E2\u05DC \u05D4\u05D2\u05EA\u05D9\u05EA');
|
|
3209
|
+
} else {
|
|
3210
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E6"\u05D3 - \u05D0-\u05DC \u05E0\u05E7\u05DE\u05D5\u05EA.. \u05D9\u05E9\u05E8\u05D9 \u05DC\u05D1');
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
break;
|
|
3214
|
+
}
|
|
3215
|
+
}
|
|
3216
|
+
break;
|
|
3217
|
+
case 21:
|
|
3218
|
+
addDayNote("Hoshana Raba", "\u05D4\u05D5\u05E9\u05E2\u05D4 \u05E8\u05D1\u05D4");
|
|
3219
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3220
|
+
if (isNightTime) {
|
|
3221
|
+
addTefillahNote("Mishneh Torah", "\u05DE\u05E9\u05E0\u05D4 \u05EA\u05D5\u05E8\u05D4");
|
|
3222
|
+
} else {
|
|
3223
|
+
addTefillahNote("Hoshanos", "\u05D4\u05D5\u05E9\u05E2\u05E0\u05D5\u05EA");
|
|
3224
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
3225
|
+
if (showGaonShirShelYom) {
|
|
3226
|
+
if (dow === DaysOfWeek.FRIDAY) {
|
|
3227
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E4"\u05D1 - \u05DE\u05D6\u05DE\u05D5\u05E8 \u05DC\u05D0\u05E1\u05E3');
|
|
3228
|
+
} else {
|
|
3229
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05E4"\u05D0 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E2\u05DC \u05D4\u05D2\u05EA\u05D9\u05EA');
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
break;
|
|
3234
|
+
case 22:
|
|
3235
|
+
addDayNote("Shmini Atzeres", "\u05E9\u05DE\u05D9\u05E0\u05D9 \u05E2\u05E6\u05E8\u05EA");
|
|
3236
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3237
|
+
if (israel) {
|
|
3238
|
+
addDayNote("Simchas Torah", "\u05E9\u05DE\u05D7\u05EA \u05EA\u05D5\u05E8\u05D4");
|
|
3239
|
+
addTefillahNote("Hakafos", "\u05D4\u05E7\u05E4\u05D5\u05EA");
|
|
3240
|
+
}
|
|
3241
|
+
if (isDaytime) {
|
|
3242
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
3243
|
+
addTefillahNote("Yizkor", "\u05D9\u05D6\u05DB\u05D5\u05E8");
|
|
3244
|
+
addTefillahNote("Tefilas Geshem", "\u05EA\u05E4\u05D9\u05DC\u05EA \u05D2\u05E9\u05DD");
|
|
3245
|
+
addTefillahNote("\u05DE\u05E9\u05D9\u05D1 \u05D4\u05E8\u05D5\u05D7 \u05D5\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D4\u05D2\u05E9\u05DD");
|
|
3246
|
+
if (showGaonShirShelYom && dow !== DaysOfWeek.SHABBOS) {
|
|
3247
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05D9"\u05D1 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E2\u05DC \u05D4\u05E9\u05DE\u05D9\u05E0\u05D9\u05EA');
|
|
3248
|
+
}
|
|
3249
|
+
}
|
|
3250
|
+
break;
|
|
3251
|
+
}
|
|
3252
|
+
if (day === 23) {
|
|
3253
|
+
if (!israel) {
|
|
3254
|
+
addDayNote("Simchas Torah", "\u05E9\u05DE\u05D7\u05EA \u05EA\u05D5\u05E8\u05D4");
|
|
3255
|
+
addTefillahNote("Ya`aleh V`yavo", "\u05D9\u05E2\u05DC\u05D4 \u05D5\u05D9\u05D1\u05D0");
|
|
3256
|
+
addTefillahNote("Hakafos", "\u05D4\u05E7\u05E4\u05D5\u05EA");
|
|
3257
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
3258
|
+
} else {
|
|
3259
|
+
addDayNote("Issru Chag", "\u05D0\u05D9\u05E1\u05E8\u05D5 \u05D7\u05D2");
|
|
3260
|
+
if (isNightTime) {
|
|
3261
|
+
addDayNote("\u05D0 \u05D2\u05D5\u05D8\u05E2\u05DF \u05D5\u05D5\u05D9\u05E0\u05D8\u05E2\u05E8", "\u05D7\u05D5\u05E8\u05E3 \u05D8\u05D5\u05D1");
|
|
3262
|
+
} else if (dow !== DaysOfWeek.SHABBOS && isMorning) {
|
|
3263
|
+
noLaminatzeach();
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
} else if (dow === DaysOfWeek.SHABBOS && [15, 17, 18, 19, 20].includes(day)) {
|
|
3267
|
+
addTefillahNote("Megilas Koheles", "\u05DE\u05D2\u05D9\u05DC\u05EA \u05E7\u05D4\u05DC\u05EA");
|
|
3268
|
+
}
|
|
3269
|
+
if (day < 22) {
|
|
3270
|
+
addTefillahNote("L`Dovid Hashem Ori", "\u05DC\u05D3\u05D5\u05D3 \u05D4");
|
|
3271
|
+
} else if (day > 22) {
|
|
3272
|
+
addTefillahNote("Mashiv Haruach U`Morid Hageshem", "\u05DE\u05E9\u05D9\u05D1 \u05D4\u05E8\u05D5\u05D7 \u05D5\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D4\u05D2\u05E9\u05DD");
|
|
3273
|
+
}
|
|
3274
|
+
break;
|
|
3275
|
+
case JewishMonthsNames.CHESHVAN:
|
|
3276
|
+
if (isDaytime && (dow === DaysOfWeek.MONDAY && day > 3 && day < 13 || dow === DaysOfWeek.THURSDAY && day > 6 && day < 14 || dow === DaysOfWeek.MONDAY && day > 10 && day < 18)) {
|
|
3277
|
+
addTefillahNote("Ba`Hab", '\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA \u05D1\u05D4"\u05D1');
|
|
3278
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
3279
|
+
}
|
|
3280
|
+
if (day <= 22) {
|
|
3281
|
+
addTefillahNote("Mashiv Haruach U`Morid Hageshem", "\u05DE\u05E9\u05D9\u05D1 \u05D4\u05E8\u05D5\u05D7 \u05D5\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D4\u05D2\u05E9\u05DD");
|
|
3282
|
+
}
|
|
3283
|
+
if ((location.Israel && day >= 7 || !location.Israel && showVsainTalUmatarInChul) && dow !== DaysOfWeek.SHABBOS) {
|
|
3284
|
+
addTefillahNote("V`sain Tal U`matar", "\u05D5\u05EA\u05DF \u05D8\u05DC \u05D5\u05DE\u05D8\u05E8");
|
|
3285
|
+
}
|
|
3286
|
+
break;
|
|
3287
|
+
case JewishMonthsNames.KISLEV:
|
|
3288
|
+
if ((location.Israel && day <= 7 || !location.Israel && showVsainTalUmatarInChul) && dow !== DaysOfWeek.SHABBOS) {
|
|
3289
|
+
addTefillahNote("V`sain Tal U`matar", "\u05D5\u05EA\u05DF \u05D8\u05DC \u05D5\u05DE\u05D8\u05E8");
|
|
3290
|
+
} else if (day === 24 && dow !== DaysOfWeek.SHABBOS && isAfternoon) {
|
|
3291
|
+
dayInfo.noTachnun = true;
|
|
3292
|
+
} else if (day >= 25) {
|
|
3293
|
+
dayInfo.noTachnun = true;
|
|
3294
|
+
addDayNote("Chanukah", "\u05D7\u05E0\u05D5\u05DB\u05D4");
|
|
3295
|
+
addTefillahNote("Al Hanissim", "\u05E2\u05DC \u05D4\u05E0\u05D9\u05E1\u05D9\u05DD");
|
|
3296
|
+
if (isDaytime) {
|
|
3297
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
3298
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS)
|
|
3299
|
+
noLaminatzeach();
|
|
3300
|
+
if (showGaonShirShelYom && day !== 30 && dow !== DaysOfWeek.SHABBOS) {
|
|
3301
|
+
addTefillahNote("\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05DC' - \u05DE\u05D6\u05DE\u05D5\u05E8 \u05E9\u05D9\u05E8 \u05D7\u05E0\u05D5\u05DB\u05EA \u05D4\u05D1\u05D9\u05EA");
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
break;
|
|
3306
|
+
case JewishMonthsNames.TEVES:
|
|
3307
|
+
if (!location.Israel && showVsainTalUmatarInChul && dow !== DaysOfWeek.SHABBOS) {
|
|
3308
|
+
addTefillahNote("V`sain Tal U`matar", "\u05D5\u05EA\u05DF \u05D8\u05DC \u05D5\u05DE\u05D8\u05E8");
|
|
3309
|
+
}
|
|
3310
|
+
if (day <= (jDate.isShortKislev(jdate.Year) ? 3 : 2)) {
|
|
3311
|
+
dayInfo.noTachnun = true;
|
|
3312
|
+
addDayNote("Chanukah", "\u05D7\u05E0\u05D5\u05DB\u05D4");
|
|
3313
|
+
addTefillahNote("Al Hanissim", "\u05E2\u05DC \u05D4\u05E0\u05D9\u05E1\u05D9\u05DD");
|
|
3314
|
+
if (isDaytime) {
|
|
3315
|
+
addTefillahNote("Full Hallel", "\u05D4\u05DC\u05DC \u05D4\u05E9\u05DC\u05DD");
|
|
3316
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS) {
|
|
3317
|
+
noLaminatzeach();
|
|
3318
|
+
if (day !== 1 && showGaonShirShelYom) {
|
|
3319
|
+
addTefillahNote("\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05DC' - \u05DE\u05D6\u05DE\u05D5\u05E8 \u05E9\u05D9\u05E8 \u05D7\u05E0\u05D5\u05DB\u05EA \u05D4\u05D1\u05D9\u05EA");
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
} else if (day === 10 && isDaytime) {
|
|
3324
|
+
addDayNote("Fast of Asara B`Teves", "\u05E2\u05E9\u05E8\u05D4 \u05D1\u05D8\u05D1\u05EA");
|
|
3325
|
+
if (isMorning) {
|
|
3326
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
3327
|
+
}
|
|
3328
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
3329
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
3330
|
+
}
|
|
3331
|
+
break;
|
|
3332
|
+
case JewishMonthsNames.SHVAT:
|
|
3333
|
+
if (day === 14 && isAfternoon)
|
|
3334
|
+
dayInfo.noTachnun = true;
|
|
3335
|
+
if (day === 15) {
|
|
3336
|
+
dayInfo.noTachnun = true;
|
|
3337
|
+
addDayNote("Tu B`Shvat", '\u05D8"\u05D5 \u05D1\u05E9\u05D1\u05D8');
|
|
3338
|
+
}
|
|
3339
|
+
break;
|
|
3340
|
+
case JewishMonthsNames.ADAR:
|
|
3341
|
+
case JewishMonthsNames.ADAR_SHEINI:
|
|
3342
|
+
if (month === JewishMonthsNames.ADAR && isLeapYear) {
|
|
3343
|
+
if (day === 13 && isAfternoon)
|
|
3344
|
+
dayInfo.noTachnun = true;
|
|
3345
|
+
if ([14, 15].includes(day)) {
|
|
3346
|
+
addDayNote(
|
|
3347
|
+
day === 14 ? showEnglish ? "Purim Katan" : "\u05E4\u05D5\u05E8\u05D9\u05DD \u05E7\u05D8\u05DF" : showEnglish ? "Shushan Purim Katan" : "\u05E9\u05D5\u05E9\u05DF \u05E4\u05D5\u05E8\u05D9\u05DD \u05E7\u05D8\u05DF"
|
|
3348
|
+
);
|
|
3349
|
+
if (isDaytime) {
|
|
3350
|
+
dayInfo.noTachnun = true;
|
|
3351
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS) {
|
|
3352
|
+
noLaminatzeach();
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
} else {
|
|
3357
|
+
if (isDaytime && (day === 11 && dow === DaysOfWeek.THURSDAY || day === 13 && dow !== DaysOfWeek.SHABBOS)) {
|
|
3358
|
+
if (isMorning) {
|
|
3359
|
+
addDayNote("Fast of Ta`anis Esther", "\u05EA\u05E2\u05E0\u05D9\u05EA \u05D0\u05E1\u05EA\u05E8");
|
|
3360
|
+
addTefillahNote("Selichos", "\u05E1\u05DC\u05D9\u05D7\u05D5\u05EA");
|
|
3361
|
+
}
|
|
3362
|
+
addTefillahNote("Avinu Malkeinu", "\u05D0\u05D1\u05D9\u05E0\u05D5 \u05DE\u05DC\u05DB\u05E0\u05D5");
|
|
3363
|
+
addTefillahNote("Aneinu", "\u05E2\u05E0\u05E0\u05D5");
|
|
3364
|
+
} else {
|
|
3365
|
+
const isYerushalayim = location.Name === "Jerusalem" || location.NameHebrew === "\u05D9\u05E8\u05D5\u05E9\u05DC\u05D9\u05DD";
|
|
3366
|
+
if (day === 14) {
|
|
3367
|
+
dayInfo.noTachnun = true;
|
|
3368
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS) {
|
|
3369
|
+
noLaminatzeach();
|
|
3370
|
+
}
|
|
3371
|
+
if (!isYerushalayim || dow === DaysOfWeek.FRIDAY) {
|
|
3372
|
+
addDayNote("Megilas Esther", "\u05DE\u05D2\u05D9\u05DC\u05EA \u05D0\u05E1\u05EA\u05E8");
|
|
3373
|
+
if (!isYerushalayim) {
|
|
3374
|
+
addDayNote("Purim", "\u05E4\u05D5\u05E8\u05D9\u05DD");
|
|
3375
|
+
addTefillahNote("Al Hanissim", "\u05E2\u05DC \u05D4\u05E0\u05D9\u05E1\u05D9\u05DD");
|
|
3376
|
+
if (showGaonShirShelYom) {
|
|
3377
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05DB"\u05D1 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E2\u05DC \u05D0\u05D9\u05DC\u05EA \u05D4\u05E9\u05D7\u05E8');
|
|
3378
|
+
}
|
|
3379
|
+
} else {
|
|
3380
|
+
addDayNote("Matanos LeEvyonim", "\u05DE\u05EA\u05E0\u05D5\u05EA \u05DC\u05D0\u05D1\u05D9\u05D5\u05E0\u05D9\u05DD");
|
|
3381
|
+
}
|
|
3382
|
+
} else {
|
|
3383
|
+
addDayNote("Purim D`Prazim", "\u05E4\u05D5\u05E8\u05D9\u05DD \u05D3\u05E4\u05E8\u05D6\u05D9\u05DD");
|
|
3384
|
+
}
|
|
3385
|
+
} else if (day === 15) {
|
|
3386
|
+
dayInfo.noTachnun = true;
|
|
3387
|
+
if (isMorning && dow !== DaysOfWeek.SHABBOS) {
|
|
3388
|
+
noLaminatzeach();
|
|
3389
|
+
}
|
|
3390
|
+
if (isYerushalayim) {
|
|
3391
|
+
addDayNote("Purim", "\u05E4\u05D5\u05E8\u05D9\u05DD");
|
|
3392
|
+
addTefillahNote("Al Hanissim", "\u05E2\u05DC \u05D4\u05E0\u05D9\u05E1\u05D9\u05DD");
|
|
3393
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
3394
|
+
addDayNote("Megilas Esther", "\u05DE\u05D2\u05D9\u05DC\u05EA \u05D0\u05E1\u05EA\u05E8");
|
|
3395
|
+
}
|
|
3396
|
+
if (showGaonShirShelYom && isDaytime && dow !== DaysOfWeek.SHABBOS) {
|
|
3397
|
+
addTefillahNote('\u05E9\u05D9\u05E8 \u05E9\u05DC \u05D9\u05D5\u05DD - \u05DB"\u05D1 - \u05DC\u05DE\u05E0\u05E6\u05D7 \u05E2\u05DC \u05D0\u05D9\u05DC\u05EA \u05D4\u05E9\u05D7\u05E8');
|
|
3398
|
+
}
|
|
3399
|
+
} else if ([
|
|
3400
|
+
"\u05D8\u05D1\u05E8\u05D9\u05D4",
|
|
3401
|
+
"\u05D9\u05E4\u05D5",
|
|
3402
|
+
"\u05E2\u05DB\u05D5",
|
|
3403
|
+
"\u05E6\u05E4\u05EA",
|
|
3404
|
+
"\u05D1\u05D0\u05E8 \u05E9\u05D1\u05E2",
|
|
3405
|
+
"\u05D7\u05D9\u05E4\u05D4",
|
|
3406
|
+
"\u05D1\u05D0\u05E8 \u05E9\u05D1\u05E2",
|
|
3407
|
+
"\u05D1\u05D9\u05EA \u05E9\u05D0\u05DF",
|
|
3408
|
+
"\u05DC\u05D5\u05D3"
|
|
3409
|
+
].includes(location.Name)) {
|
|
3410
|
+
addDayNote("Purim D`Mukafin", "\u05E4\u05D5\u05E8\u05D9\u05DD \u05D3\u05DE\u05D5\u05E7\u05E4\u05D9\u05DF");
|
|
3411
|
+
if (dow !== DaysOfWeek.SHABBOS) {
|
|
3412
|
+
addDayNote("(Megilas Esther)", "(\u05DE\u05D2\u05D9\u05DC\u05EA \u05D0\u05E1\u05EA\u05E8)");
|
|
3413
|
+
}
|
|
3414
|
+
} else {
|
|
3415
|
+
addDayNote("Shushan Purim", "\u05E9\u05D5\u05E9\u05DF \u05E4\u05D5\u05E8\u05D9\u05DD");
|
|
3416
|
+
}
|
|
3417
|
+
} else if (day === 16 && isYerushalayim && dow === DaysOfWeek.SUNDAY) {
|
|
3418
|
+
addDayNote("Purim Seuda and Mishloach Manos", "\u05E1\u05E2\u05D5\u05D3\u05EA \u05E4\u05D5\u05E8\u05D9\u05DD \u05D5\u05DE\u05E9\u05DC\u05D5\u05D7 \u05DE\u05E0\u05D5\u05EA");
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
break;
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
function noLaminatzeach() {
|
|
3426
|
+
addTefillahNote("No Laminatzeach", '\u05D0"\u05D0 \u05DC\u05DE\u05E0\u05E6\u05D7');
|
|
3427
|
+
}
|
|
3428
|
+
function addDayNote(englishOrDefaultText, hebrewText) {
|
|
3429
|
+
const note = showEnglish || !hebrewText ? englishOrDefaultText : hebrewText;
|
|
3430
|
+
if (!dayNotes.includes(note)) {
|
|
3431
|
+
dayNotes.push(note);
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
function addTefillahNote(englishOrDefaultText, hebrewText) {
|
|
3435
|
+
const note = showEnglish || !hebrewText ? englishOrDefaultText : hebrewText;
|
|
3436
|
+
if (!tefillahNotes.includes(note)) {
|
|
3437
|
+
tefillahNotes.push(note);
|
|
3438
|
+
}
|
|
3439
|
+
}
|
|
3440
|
+
function hasOwnKriyasHatorah(jdate, location) {
|
|
3441
|
+
const { Month, Day, DayOfWeek } = jdate;
|
|
3442
|
+
if (Day === 1 || Day === 30) {
|
|
3443
|
+
return true;
|
|
3444
|
+
}
|
|
3445
|
+
switch (Month) {
|
|
3446
|
+
case 1:
|
|
3447
|
+
return Day > 14 && Day < 22;
|
|
3448
|
+
case 4:
|
|
3449
|
+
return Day === 17 || DayOfWeek === 0 && Day === 18;
|
|
3450
|
+
case 5:
|
|
3451
|
+
return Day === 9 || DayOfWeek === 0 && Day === 10;
|
|
3452
|
+
case 7:
|
|
3453
|
+
return [3, 16, 17, 18, 19, 20, 21].includes(Day) || DayOfWeek === 0 && Day === 4;
|
|
3454
|
+
case 9:
|
|
3455
|
+
return Day >= 25;
|
|
3456
|
+
case 10:
|
|
3457
|
+
return Day === 10 || Day < 3 || Day === 3 && jDate.isShortKislev(jdate.Year);
|
|
3458
|
+
case 12:
|
|
3459
|
+
case 13:
|
|
3460
|
+
return Month === (jDate.isJdLeapY(jdate.Year) ? JewishMonthsNames.ADAR_SHEINI : JewishMonthsNames.ADAR) && (Day === 13 || Day === (location.Name === "\u05D9\u05E8\u05D5\u05E9\u05DC\u05D9\u05DD" ? 15 : 14));
|
|
3461
|
+
default:
|
|
3462
|
+
return false;
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
export {
|
|
3466
|
+
Dafyomi,
|
|
3467
|
+
DaysOfWeek,
|
|
3468
|
+
DaysOfWeekEng,
|
|
3469
|
+
DaysOfWeekHeb,
|
|
3470
|
+
JewishMonthsEng,
|
|
3471
|
+
JewishMonthsHeb,
|
|
3472
|
+
JewishMonthsNames,
|
|
3473
|
+
Location,
|
|
3474
|
+
Locations,
|
|
3475
|
+
Molad,
|
|
3476
|
+
PirkeiAvos,
|
|
3477
|
+
SecularMonthsEng,
|
|
3478
|
+
Sedra,
|
|
3479
|
+
Utils,
|
|
3480
|
+
ZmanTypeIds,
|
|
3481
|
+
ZmanTypes,
|
|
3482
|
+
Zmanim,
|
|
3483
|
+
ZmanimUtils,
|
|
3484
|
+
closestDistanceMatch,
|
|
3485
|
+
closestNameMatch,
|
|
3486
|
+
findLocation,
|
|
3487
|
+
getNotifications,
|
|
3488
|
+
getZmanType,
|
|
3489
|
+
jDate
|
|
3490
|
+
};
|
|
3491
|
+
//# sourceMappingURL=index.js.map
|