jcal-zmanim 1.0.50 → 1.1.0

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.
Files changed (83) hide show
  1. package/LICENSE +674 -674
  2. package/{build → dist}/JCal/Dafyomi.d.ts +4 -3
  3. package/dist/JCal/Dafyomi.d.ts.map +1 -0
  4. package/{build → dist}/JCal/Dafyomi.js +9 -8
  5. package/dist/JCal/Dafyomi.js.map +1 -0
  6. package/{build → dist}/JCal/Location.d.ts +4 -4
  7. package/dist/JCal/Location.d.ts.map +1 -0
  8. package/{build → dist}/JCal/Location.js +10 -12
  9. package/dist/JCal/Location.js.map +1 -0
  10. package/{build → dist}/JCal/Molad.d.ts +1 -2
  11. package/dist/JCal/Molad.d.ts.map +1 -0
  12. package/{build → dist}/JCal/Molad.js +16 -19
  13. package/dist/JCal/Molad.js.map +1 -0
  14. package/{build → dist}/JCal/PirkeiAvos.d.ts +1 -0
  15. package/dist/JCal/PirkeiAvos.d.ts.map +1 -0
  16. package/{build → dist}/JCal/PirkeiAvos.js +4 -3
  17. package/dist/JCal/PirkeiAvos.js.map +1 -0
  18. package/{build → dist}/JCal/Sedra.d.ts +2 -1
  19. package/dist/JCal/Sedra.d.ts.map +1 -0
  20. package/{build → dist}/JCal/Sedra.js +2 -1
  21. package/dist/JCal/Sedra.js.map +1 -0
  22. package/{build → dist}/JCal/Zmanim.d.ts +1 -0
  23. package/dist/JCal/Zmanim.d.ts.map +1 -0
  24. package/{build → dist}/JCal/Zmanim.js +16 -16
  25. package/dist/JCal/Zmanim.js.map +1 -0
  26. package/{build/AppUtils.d.ts → dist/JCal/ZmanimUtils.d.ts} +10 -47
  27. package/dist/JCal/ZmanimUtils.d.ts.map +1 -0
  28. package/{build/AppUtils.js → dist/JCal/ZmanimUtils.js} +56 -122
  29. package/dist/JCal/ZmanimUtils.js.map +1 -0
  30. package/{build → dist}/JCal/jDate.d.ts +4 -3
  31. package/dist/JCal/jDate.d.ts.map +1 -0
  32. package/{build → dist}/JCal/jDate.js +24 -24
  33. package/dist/JCal/jDate.js.map +1 -0
  34. package/dist/Locations.d.ts +31 -0
  35. package/dist/Locations.d.ts.map +1 -0
  36. package/dist/Locations.js +119 -0
  37. package/dist/Locations.js.map +1 -0
  38. package/dist/Notifications.d.ts +18 -0
  39. package/dist/Notifications.d.ts.map +1 -0
  40. package/{build → dist}/Notifications.js +111 -130
  41. package/dist/Notifications.js.map +1 -0
  42. package/dist/README.md +521 -0
  43. package/{build/JCal → dist}/Utils.d.ts +72 -10
  44. package/dist/Utils.d.ts.map +1 -0
  45. package/{build/JCal → dist}/Utils.js +176 -70
  46. package/dist/Utils.js.map +1 -0
  47. package/{build → dist}/ZmanTypes.d.ts +11 -4
  48. package/dist/ZmanTypes.d.ts.map +1 -0
  49. package/{build → dist}/ZmanTypes.js +12 -5
  50. package/dist/ZmanTypes.js.map +1 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +43 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/locations.json +1 -0
  56. package/package.json +43 -33
  57. package/README.md +0 -2
  58. package/build/GeneralUtils.d.ts +0 -43
  59. package/build/GeneralUtils.js +0 -93
  60. package/build/Locations.d.ts +0 -7
  61. package/build/Locations.js +0 -1308
  62. package/build/Notifications.d.ts +0 -14
  63. package/build/Settings.d.ts +0 -25
  64. package/build/Settings.js +0 -75
  65. package/build/index.d.ts +0 -1
  66. package/build/index.js +0 -59
  67. package/src/AppUtils.ts +0 -500
  68. package/src/GeneralUtils.ts +0 -84
  69. package/src/JCal/Dafyomi.ts +0 -139
  70. package/src/JCal/Location.ts +0 -100
  71. package/src/JCal/Molad.ts +0 -105
  72. package/src/JCal/PirkeiAvos.ts +0 -180
  73. package/src/JCal/Sedra.ts +0 -215
  74. package/src/JCal/Utils.ts +0 -732
  75. package/src/JCal/Zmanim.ts +0 -270
  76. package/src/JCal/jDate.ts +0 -714
  77. package/src/Locations.ts +0 -1303
  78. package/src/Notifications.ts +0 -1243
  79. package/src/Settings.ts +0 -103
  80. package/src/ZmanTypes.ts +0 -184
  81. package/src/index.ts +0 -31
  82. package/src/jcal-zmanim.d.ts +0 -4
  83. package/tsconfig.json +0 -109
@@ -1,7 +1,6 @@
1
- import Location from './JCal/Location';
2
- import Settings from './Settings';
3
- import jDate from './JCal/jDate';
4
- import { SunTimes, Time, ZmanToShow } from './jcal-zmanim';
1
+ import Location from './Location';
2
+ import jDate from './jDate';
3
+ import { SunTimes, Time, ZmanToShow } from '../jcal-zmanim';
5
4
  type ZmanTime = {
6
5
  date: Date;
7
6
  location: Location;
@@ -15,15 +14,6 @@ type ZmanTime = {
15
14
  shaaZmanis: number | undefined;
16
15
  shaaZmanisMga: number | undefined;
17
16
  };
18
- export declare const DaysOfWeek: Readonly<{
19
- SUNDAY: 0;
20
- MONDAY: 1;
21
- TUESDAY: 2;
22
- WEDNESDAY: 3;
23
- THURSDAY: 4;
24
- FRIDAY: 5;
25
- SHABBOS: 6;
26
- }>;
27
17
  export declare const WhichDaysFlags: Readonly<{
28
18
  SUNDAY: 1;
29
19
  MONDAY: 2;
@@ -34,23 +24,8 @@ export declare const WhichDaysFlags: Readonly<{
34
24
  SHABBOS: 64;
35
25
  YOMTOV: 128;
36
26
  }>;
37
- export default class AppUtils {
27
+ export default class ZmanimUtils {
38
28
  static zmanTimesCache: ZmanTime[];
39
- /**
40
- * Returns the date corrected time of the given zmanim on the given date at the given location
41
- * If the zman is after or within 30 minutes of the given time, this days zman is returned, othwise tomorrows zman is returned.
42
- * @param {Date} sdate
43
- * @param {jDate} jdate
44
- * @param {Time} time
45
- * @param {Settings} settings
46
- * @param {Time} sunset
47
- * @returns {[{zmanType:ZmanToShow,time:Time, isTomorrow:boolean}]}
48
- */
49
- static getCorrectZmanTimes(sdate: Date, jdate: jDate, time: Time, settings: Settings, sunset: Time): {
50
- zmanType: ZmanToShow;
51
- time: Time;
52
- isTomorrow: boolean;
53
- }[];
54
29
  /**
55
30
  * Gets the zmanim for all the types in the given list.
56
31
  * @param {[ZmanToShow]} zmanTypes An array of ZmanTypes to get the zman for.
@@ -69,15 +44,14 @@ export default class AppUtils {
69
44
  * @param {jDate} jdate
70
45
  * @param {Location} location
71
46
  */
72
- static getWhichDays(date: Date, jdate: jDate, location: Location): 1 | 0 | 2 | 4 | 8 | 16 | 32 | 64 | 128;
47
+ static getWhichDays(date: Date, jdate: jDate, location: Location): 2 | 0 | 1 | 8 | 32 | 4 | 16 | 64 | 128;
73
48
  /**
74
49
  * Returns the zmanim necessary for showing basic shul notifications: chatzosHayom, chatzosHalayla, alos
75
- * @param {jDate} jdate
76
- * @param {Date} sdate
50
+ * @param {jDate|Date} date
77
51
  * @param {Location} location
78
52
  * @returns {{chatzosHayom:Time, chatzosHalayla:Time, alos:Time, shkia:Time }}
79
53
  */
80
- static getBasicShulZmanim(jdate: jDate, sdate: Date, location: Location): {
54
+ static getBasicShulZmanim(date: jDate | Date, location: Location): {
81
55
  chatzosHayom: Time | undefined;
82
56
  chatzosHalayla: Time | undefined;
83
57
  alos: Time | undefined;
@@ -85,25 +59,14 @@ export default class AppUtils {
85
59
  };
86
60
  /**
87
61
  * Returns all the zmanim for the given day
88
- * @param {jDate} jdate
89
- * @param {Date} sdate
62
+ * @param {Date|jDate} date
90
63
  * @param {Location} location
91
64
  * @returns {{zmanType:ZmanToShow, time?:Time }[]}
92
65
  */
93
- static getAllZmanim(jdate: jDate, sdate: Date, location: Location): {
66
+ static getAllZmanim(date: jDate | Date, location: Location): {
94
67
  zmanType: ZmanToShow;
95
68
  time?: Time | undefined;
96
69
  }[];
97
- /**
98
- * Compares two zmanim for showing to see if they are the same
99
- * @param {{id:number,offset:?Number, whichDaysFlags:?Number, desc: String, eng: String, heb: String }} zman1
100
- * @param {{id:number,offset:?Number, whichDaysFlags:?Number, desc: String, eng: String, heb: String }} zman2
101
- */
102
- static IsSameZmanToShow(zman1: ZmanToShow, zman2: ZmanToShow): boolean;
103
- /**
104
- * Returns all available ZmanTypes - including baseTypes and custom added types
105
- * @param {Settings} settings
106
- */
107
- static AllZmanTypes(settings: Settings): ZmanToShow[];
108
70
  }
109
71
  export {};
72
+ //# sourceMappingURL=ZmanimUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZmanimUtils.d.ts","sourceRoot":"","sources":["../../src/JCal/ZmanimUtils.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,KAAK,QAAQ,GAAG;IACZ,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC;IACzB,cAAc,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,aAAa,EAAE,IAAI,GAAG,SAAS,CAAC;IAChC,YAAY,EAAE,IAAI,GAAG,SAAS,CAAC;IAC/B,WAAW,EAAE,IAAI,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;AACF,eAAO,MAAM,cAAc;;;;;;;;;EASzB,CAAC;AAEH,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,MAAM,CAAC,cAAc,EAAE,QAAQ,EAAE,CAAM;IAEvC;;;;;;;OAOG;IACH,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAG;QAAE,QAAQ,EAAE,UAAU,CAAC;QAAC,IAAI,CAAC,EAAE,IAAI,CAAA;KAAE,EAAE;IAkSnI;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ;IAuBhE;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ;;;;;;IAqBhE;;;;;MAKE;IACF,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ;;;;CAI7D"}
@@ -3,19 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.WhichDaysFlags = exports.DaysOfWeek = void 0;
7
- const Utils_1 = __importDefault(require("./JCal/Utils"));
8
- const Zmanim_1 = __importDefault(require("./JCal/Zmanim"));
9
- const ZmanTypes_1 = require("./ZmanTypes");
10
- exports.DaysOfWeek = Object.freeze({
11
- SUNDAY: 0,
12
- MONDAY: 1,
13
- TUESDAY: 2,
14
- WEDNESDAY: 3,
15
- THURSDAY: 4,
16
- FRIDAY: 5,
17
- SHABBOS: 6,
18
- });
6
+ exports.WhichDaysFlags = void 0;
7
+ const Utils_1 = require("../Utils");
8
+ const Zmanim_1 = __importDefault(require("./Zmanim"));
9
+ const ZmanTypes_1 = require("../ZmanTypes");
19
10
  exports.WhichDaysFlags = Object.freeze({
20
11
  SUNDAY: 1,
21
12
  MONDAY: 2,
@@ -26,45 +17,7 @@ exports.WhichDaysFlags = Object.freeze({
26
17
  SHABBOS: 64,
27
18
  YOMTOV: 128,
28
19
  });
29
- class AppUtils {
30
- /**
31
- * Returns the date corrected time of the given zmanim on the given date at the given location
32
- * If the zman is after or within 30 minutes of the given time, this days zman is returned, othwise tomorrows zman is returned.
33
- * @param {Date} sdate
34
- * @param {jDate} jdate
35
- * @param {Time} time
36
- * @param {Settings} settings
37
- * @param {Time} sunset
38
- * @returns {[{zmanType:ZmanToShow,time:Time, isTomorrow:boolean}]}
39
- */
40
- static getCorrectZmanTimes(sdate, jdate, time, settings, sunset) {
41
- const correctedTimes = [], zmanTypes = settings.zmanimToShow, location = settings.location, tomorrowJd = jdate.addDays(1), tomorrowSd = Utils_1.default.addDaysToSdate(sdate, 1),
42
- /* Candle lighting and chometz times are not shown after sunset.
43
- This solves the issue of Candle lighting showing as having "passed 20 minutes ago"
44
- Thursday evening after sunset - which shows as hasCandleLighting = true
45
- as it is already Friday... */
46
- zmanTimes = AppUtils.getZmanTimes(zmanTypes.filter((zt) => ![21, 22, 23].includes(zt.id) || Utils_1.default.isTimeAfter(time, sunset)), sdate, jdate, location), tomorrowTimes = AppUtils.getZmanTimes(
47
- //Candle lighting tomorrow is never shown...
48
- zmanTypes.filter((zt) => zt.id !== 21), tomorrowSd, tomorrowJd, location);
49
- for (let zt of zmanTimes) {
50
- let oTime = zt.time, isTomorrow = false, diff = Utils_1.default.timeDiff(time, oTime, true);
51
- if (diff.sign < 1 &&
52
- Utils_1.default.totalMinutes(diff) >= settings.minToShowPassedZman) {
53
- const tom = tomorrowTimes.find((t) => t.zmanType === zt.zmanType);
54
- if (tom && tom.time) {
55
- oTime = tom.time;
56
- isTomorrow = true;
57
- }
58
- }
59
- correctedTimes.push({
60
- zmanType: zt.zmanType,
61
- time: oTime,
62
- isTomorrow,
63
- });
64
- }
65
- return correctedTimes.sort((a, b) => (a.isTomorrow ? 1 : -1) - (b.isTomorrow ? 1 : -1) ||
66
- Utils_1.default.totalSeconds(a.time) - Utils_1.default.totalSeconds(b.time));
67
- }
20
+ class ZmanimUtils {
68
21
  /**
69
22
  * Gets the zmanim for all the types in the given list.
70
23
  * @param {[ZmanToShow]} zmanTypes An array of ZmanTypes to get the zman for.
@@ -74,8 +27,8 @@ class AppUtils {
74
27
  * @returns{[{zmanType:{id:number,offset:?number,desc:string,eng:string,heb:string },time:Time}]}
75
28
  */
76
29
  static getZmanTimes(zmanTypes, date, jdate, location) {
77
- const mem = AppUtils.zmanTimesCache.find((z) => Utils_1.default.isSameSdate(z.date, date) &&
78
- z.location.Name === location.Name), zmanTimes = [], whichDay = AppUtils.getWhichDays(date, jdate, location);
30
+ const mem = ZmanimUtils.zmanTimesCache.find((z) => Utils_1.Utils.isSameSdate(z.date, date) &&
31
+ z.location.Name === location.Name), zmanTimes = [], whichDay = ZmanimUtils.getWhichDays(date, jdate, location);
79
32
  let sunrise, sunset, suntimesMishor, sunriseMishor, sunsetMishor, mishorNeg90, chatzos, shaaZmanis, shaaZmanisMga;
80
33
  if (mem) {
81
34
  sunrise = mem.sunrise;
@@ -95,7 +48,7 @@ class AppUtils {
95
48
  suntimesMishor = Zmanim_1.default.getSunTimes(date, location, false);
96
49
  sunriseMishor = suntimesMishor.sunrise;
97
50
  sunsetMishor = suntimesMishor.sunset;
98
- mishorNeg90 = Utils_1.default.addMinutes(sunriseMishor, -90);
51
+ mishorNeg90 = Utils_1.Utils.addMinutes(sunriseMishor, -90);
99
52
  chatzos =
100
53
  sunriseMishor &&
101
54
  sunsetMishor &&
@@ -108,7 +61,7 @@ class AppUtils {
108
61
  sunriseMishor &&
109
62
  sunsetMishor &&
110
63
  Zmanim_1.default.getShaaZmanisMga(suntimesMishor, true);
111
- AppUtils.zmanTimesCache.push({
64
+ ZmanimUtils.zmanTimesCache.push({
112
65
  date,
113
66
  location,
114
67
  sunrise,
@@ -131,34 +84,34 @@ class AppUtils {
131
84
  case ZmanTypes_1.ZmanTypeIds.ChatzosLayla: // chatzosNight
132
85
  zmanTimes.push({
133
86
  zmanType,
134
- time: Utils_1.default.addMinutes(chatzos, 720 + offset),
87
+ time: Utils_1.Utils.addMinutes(chatzos, 720 + offset),
135
88
  });
136
89
  break;
137
90
  case ZmanTypes_1.ZmanTypeIds.Alos90: // alos90
138
91
  zmanTimes.push({
139
92
  zmanType,
140
93
  time: offset
141
- ? Utils_1.default.addMinutes(mishorNeg90, offset)
94
+ ? Utils_1.Utils.addMinutes(mishorNeg90, offset)
142
95
  : mishorNeg90,
143
96
  });
144
97
  break;
145
98
  case ZmanTypes_1.ZmanTypeIds.Alos72: // alos72
146
99
  zmanTimes.push({
147
100
  zmanType,
148
- time: Utils_1.default.addMinutes(sunriseMishor, -72 + offset),
101
+ time: Utils_1.Utils.addMinutes(sunriseMishor, -72 + offset),
149
102
  });
150
103
  break;
151
104
  case ZmanTypes_1.ZmanTypeIds.TalisTefillin: //talisTefillin
152
105
  zmanTimes.push({
153
106
  zmanType,
154
- time: Utils_1.default.addMinutes(sunriseMishor, -36 + offset),
107
+ time: Utils_1.Utils.addMinutes(sunriseMishor, -36 + offset),
155
108
  });
156
109
  break;
157
110
  case ZmanTypes_1.ZmanTypeIds.NetzAtElevation: //netzElevation
158
111
  zmanTimes.push({
159
112
  zmanType,
160
113
  time: offset
161
- ? Utils_1.default.addMinutes(sunrise, offset)
114
+ ? Utils_1.Utils.addMinutes(sunrise, offset)
162
115
  : sunrise,
163
116
  });
164
117
  break;
@@ -166,7 +119,7 @@ class AppUtils {
166
119
  zmanTimes.push({
167
120
  zmanType,
168
121
  time: offset
169
- ? Utils_1.default.addMinutes(sunriseMishor, offset)
122
+ ? Utils_1.Utils.addMinutes(sunriseMishor, offset)
170
123
  : sunriseMishor,
171
124
  });
172
125
  break;
@@ -174,35 +127,35 @@ class AppUtils {
174
127
  if (shaaZmanisMga)
175
128
  zmanTimes.push({
176
129
  zmanType,
177
- time: Utils_1.default.addMinutes(mishorNeg90, Math.floor(shaaZmanisMga * 3) + offset),
130
+ time: Utils_1.Utils.addMinutes(mishorNeg90, Math.floor(shaaZmanisMga * 3) + offset),
178
131
  });
179
132
  break;
180
133
  case ZmanTypes_1.ZmanTypeIds.szksGra: //szksGra
181
134
  if (shaaZmanis)
182
135
  zmanTimes.push({
183
136
  zmanType,
184
- time: Utils_1.default.addMinutes(sunriseMishor, Math.floor(shaaZmanis * 3) + offset),
137
+ time: Utils_1.Utils.addMinutes(sunriseMishor, Math.floor(shaaZmanis * 3) + offset),
185
138
  });
186
139
  break;
187
140
  case ZmanTypes_1.ZmanTypeIds.sztMga: // sztMga
188
141
  if (shaaZmanisMga)
189
142
  zmanTimes.push({
190
143
  zmanType,
191
- time: Utils_1.default.addMinutes(mishorNeg90, Math.floor(shaaZmanisMga * 4) + offset),
144
+ time: Utils_1.Utils.addMinutes(mishorNeg90, Math.floor(shaaZmanisMga * 4) + offset),
192
145
  });
193
146
  break;
194
147
  case ZmanTypes_1.ZmanTypeIds.sztGra: //sztGra
195
148
  if (shaaZmanis)
196
149
  zmanTimes.push({
197
150
  zmanType,
198
- time: Utils_1.default.addMinutes(sunriseMishor, Math.floor(shaaZmanis * 4) + offset),
151
+ time: Utils_1.Utils.addMinutes(sunriseMishor, Math.floor(shaaZmanis * 4) + offset),
199
152
  });
200
153
  break;
201
154
  case ZmanTypes_1.ZmanTypeIds.chatzosDay: //chatzos
202
155
  zmanTimes.push({
203
156
  zmanType,
204
157
  time: offset
205
- ? Utils_1.default.addMinutes(chatzos, offset)
158
+ ? Utils_1.Utils.addMinutes(chatzos, offset)
206
159
  : chatzos,
207
160
  });
208
161
  break;
@@ -210,28 +163,28 @@ class AppUtils {
210
163
  if (shaaZmanis)
211
164
  zmanTimes.push({
212
165
  zmanType,
213
- time: Utils_1.default.addMinutes(chatzos, shaaZmanis * 0.5 + offset),
166
+ time: Utils_1.Utils.addMinutes(chatzos, shaaZmanis * 0.5 + offset),
214
167
  });
215
168
  break;
216
169
  case ZmanTypes_1.ZmanTypeIds.minKet: //minKet
217
170
  if (shaaZmanis)
218
171
  zmanTimes.push({
219
172
  zmanType,
220
- time: Utils_1.default.addMinutes(sunriseMishor, shaaZmanis * 9.5 + offset),
173
+ time: Utils_1.Utils.addMinutes(sunriseMishor, shaaZmanis * 9.5 + offset),
221
174
  });
222
175
  break;
223
176
  case ZmanTypes_1.ZmanTypeIds.plag: //plag
224
177
  if (shaaZmanis)
225
178
  zmanTimes.push({
226
179
  zmanType,
227
- time: Utils_1.default.addMinutes(sunriseMishor, shaaZmanis * 10.75 + offset),
180
+ time: Utils_1.Utils.addMinutes(sunriseMishor, shaaZmanis * 10.75 + offset),
228
181
  });
229
182
  break;
230
183
  case ZmanTypes_1.ZmanTypeIds.shkiaAtSeaLevel: //shkiaMishor
231
184
  zmanTimes.push({
232
185
  zmanType,
233
186
  time: offset
234
- ? Utils_1.default.addMinutes(sunsetMishor, offset)
187
+ ? Utils_1.Utils.addMinutes(sunsetMishor, offset)
235
188
  : sunsetMishor,
236
189
  });
237
190
  break;
@@ -239,57 +192,57 @@ class AppUtils {
239
192
  zmanTimes.push({
240
193
  zmanType,
241
194
  time: offset
242
- ? Utils_1.default.addMinutes(sunset, offset)
195
+ ? Utils_1.Utils.addMinutes(sunset, offset)
243
196
  : sunset,
244
197
  });
245
198
  break;
246
199
  case ZmanTypes_1.ZmanTypeIds.tzais45: // tzais45
247
200
  zmanTimes.push({
248
201
  zmanType,
249
- time: Utils_1.default.addMinutes(sunset, 45 + offset),
202
+ time: Utils_1.Utils.addMinutes(sunset, 45 + offset),
250
203
  });
251
204
  break;
252
205
  case ZmanTypes_1.ZmanTypeIds.tzais50: //tzais50
253
206
  zmanTimes.push({
254
207
  zmanType,
255
- time: Utils_1.default.addMinutes(sunset, 50 + offset),
208
+ time: Utils_1.Utils.addMinutes(sunset, 50 + offset),
256
209
  });
257
210
  break;
258
211
  case ZmanTypes_1.ZmanTypeIds.tzais72: //tzais72
259
212
  zmanTimes.push({
260
213
  zmanType,
261
- time: Utils_1.default.addMinutes(sunset, 72 + offset),
214
+ time: Utils_1.Utils.addMinutes(sunset, 72 + offset),
262
215
  });
263
216
  break;
264
217
  case ZmanTypes_1.ZmanTypeIds.rabbeinuTamZmanios: //tzais72Zmaniot
265
218
  if (shaaZmanis)
266
219
  zmanTimes.push({
267
220
  zmanType,
268
- time: Utils_1.default.addMinutes(sunset, shaaZmanis * 1.2 + offset),
221
+ time: Utils_1.Utils.addMinutes(sunset, shaaZmanis * 1.2 + offset),
269
222
  });
270
223
  break;
271
224
  case ZmanTypes_1.ZmanTypeIds.rabbeinuTamZmaniosMga: //tzais72ZmaniotMA
272
225
  if (shaaZmanisMga)
273
226
  zmanTimes.push({
274
227
  zmanType,
275
- time: Utils_1.default.addMinutes(sunset, shaaZmanisMga * 1.2 + offset),
228
+ time: Utils_1.Utils.addMinutes(sunset, shaaZmanisMga * 1.2 + offset),
276
229
  });
277
230
  break;
278
231
  case ZmanTypes_1.ZmanTypeIds.candleLighting: //candleLighting
279
232
  if (sunset && jdate.hasCandleLighting()) {
280
233
  zmanTimes.push({
281
234
  zmanType,
282
- time: Utils_1.default.addMinutes(Zmanim_1.default.getCandleLightingFromSunset(sunset, location), offset),
235
+ time: Utils_1.Utils.addMinutes(Zmanim_1.default.getCandleLightingFromSunset(sunset, location), offset),
283
236
  });
284
237
  }
285
238
  break;
286
239
  case ZmanTypes_1.ZmanTypeIds.SofZmanEatingChometz: //Sof Zman Achilas Chometz
287
240
  if (shaaZmanisMga && jdate.Month === 1 &&
288
241
  jdate.Day === 14 &&
289
- Utils_1.default.isTimeAfter(sunrise, Utils_1.default.timeFromDate(date))) {
242
+ Utils_1.Utils.isTimeAfter(sunrise, Utils_1.Utils.timeFromDate(date))) {
290
243
  zmanTimes.push({
291
244
  zmanType,
292
- time: Utils_1.default.addMinutes(sunrise, -90 + offset + shaaZmanisMga * 4),
245
+ time: Utils_1.Utils.addMinutes(sunrise, -90 + offset + shaaZmanisMga * 4),
293
246
  });
294
247
  }
295
248
  break;
@@ -297,12 +250,12 @@ class AppUtils {
297
250
  if (shaaZmanisMga &&
298
251
  jdate.Month === 1 &&
299
252
  (jdate.Day === 14 ||
300
- (jdate.DayOfWeek === exports.DaysOfWeek.FRIDAY &&
253
+ (jdate.DayOfWeek === Utils_1.DaysOfWeek.FRIDAY &&
301
254
  jdate.Day === 13)) &&
302
- Utils_1.default.isTimeAfter(sunrise, Utils_1.default.timeFromDate(date))) {
255
+ Utils_1.Utils.isTimeAfter(sunrise, Utils_1.Utils.timeFromDate(date))) {
303
256
  zmanTimes.push({
304
257
  zmanType,
305
- time: Utils_1.default.addMinutes(sunrise, -90 + offset + shaaZmanisMga * 5),
258
+ time: Utils_1.Utils.addMinutes(sunrise, -90 + offset + shaaZmanisMga * 5),
306
259
  });
307
260
  }
308
261
  break;
@@ -317,36 +270,36 @@ class AppUtils {
317
270
  * @param {Location} location
318
271
  */
319
272
  static getWhichDays(date, jdate, location) {
320
- if (jdate.isYomTov(location.Israel)) {
273
+ if (jdate.isYomTov(!!location.Israel)) {
321
274
  return exports.WhichDaysFlags.YOMTOV;
322
275
  }
323
276
  switch (date.getDay()) {
324
- case exports.DaysOfWeek.SUNDAY:
277
+ case Utils_1.DaysOfWeek.SUNDAY:
325
278
  return exports.WhichDaysFlags.SUNDAY;
326
- case exports.DaysOfWeek.MONDAY:
279
+ case Utils_1.DaysOfWeek.MONDAY:
327
280
  return exports.WhichDaysFlags.MONDAY;
328
- case exports.DaysOfWeek.TUESDAY:
281
+ case Utils_1.DaysOfWeek.TUESDAY:
329
282
  return exports.WhichDaysFlags.TUESDAY;
330
- case exports.DaysOfWeek.WEDNESDAY:
283
+ case Utils_1.DaysOfWeek.WEDNESDAY:
331
284
  return exports.WhichDaysFlags.WEDNESDAY;
332
- case exports.DaysOfWeek.THURSDAY:
285
+ case Utils_1.DaysOfWeek.THURSDAY:
333
286
  return exports.WhichDaysFlags.THURSDAY;
334
- case exports.DaysOfWeek.FRIDAY:
287
+ case Utils_1.DaysOfWeek.FRIDAY:
335
288
  return exports.WhichDaysFlags.FRIDAY;
336
- case exports.DaysOfWeek.SHABBOS:
289
+ case Utils_1.DaysOfWeek.SHABBOS:
337
290
  return exports.WhichDaysFlags.SHABBOS;
338
291
  }
339
292
  return 0;
340
293
  }
341
294
  /**
342
295
  * Returns the zmanim necessary for showing basic shul notifications: chatzosHayom, chatzosHalayla, alos
343
- * @param {jDate} jdate
344
- * @param {Date} sdate
296
+ * @param {jDate|Date} date
345
297
  * @param {Location} location
346
298
  * @returns {{chatzosHayom:Time, chatzosHalayla:Time, alos:Time, shkia:Time }}
347
299
  */
348
- static getBasicShulZmanim(jdate, sdate, location) {
349
- const zmanim = AppUtils.getZmanTimes([
300
+ static getBasicShulZmanim(date, location) {
301
+ const { sdate, jdate } = Utils_1.Utils.bothDates(date);
302
+ const zmanim = ZmanimUtils.getZmanTimes([
350
303
  (0, ZmanTypes_1.getZmanType)(ZmanTypes_1.ZmanTypeIds.chatzosDay),
351
304
  (0, ZmanTypes_1.getZmanType)(ZmanTypes_1.ZmanTypeIds.Alos90),
352
305
  (0, ZmanTypes_1.getZmanType)(ZmanTypes_1.ZmanTypeIds.shkiaElevation),
@@ -354,41 +307,22 @@ class AppUtils {
354
307
  ], sdate, jdate, location);
355
308
  return {
356
309
  chatzosHayom: zmanim[0].time,
357
- chatzosHalayla: Utils_1.default.addMinutes(zmanim[0].time, 720),
310
+ chatzosHalayla: Utils_1.Utils.addMinutes(zmanim[0].time, 720),
358
311
  alos: zmanim[1].time,
359
312
  shkia: zmanim[2].time,
360
313
  };
361
314
  }
362
315
  /**
363
316
  * Returns all the zmanim for the given day
364
- * @param {jDate} jdate
365
- * @param {Date} sdate
317
+ * @param {Date|jDate} date
366
318
  * @param {Location} location
367
319
  * @returns {{zmanType:ZmanToShow, time?:Time }[]}
368
320
  */
369
- static getAllZmanim(jdate, sdate, location) {
370
- return AppUtils.getZmanTimes(ZmanTypes_1.ZmanTypes, sdate, jdate, location);
371
- }
372
- /**
373
- * Compares two zmanim for showing to see if they are the same
374
- * @param {{id:number,offset:?Number, whichDaysFlags:?Number, desc: String, eng: String, heb: String }} zman1
375
- * @param {{id:number,offset:?Number, whichDaysFlags:?Number, desc: String, eng: String, heb: String }} zman2
376
- */
377
- static IsSameZmanToShow(zman1, zman2) {
378
- return (zman1.id === zman2.id &&
379
- zman1.desc === zman2.desc &&
380
- zman1.eng === zman2.eng &&
381
- zman1.heb === zman2.heb &&
382
- (zman1.offset || 0) === (zman2.offset || 0) &&
383
- (zman1.whichDaysFlags || 0) === (zman2.whichDaysFlags || 0));
384
- }
385
- /**
386
- * Returns all available ZmanTypes - including baseTypes and custom added types
387
- * @param {Settings} settings
388
- */
389
- static AllZmanTypes(settings) {
390
- return [...ZmanTypes_1.ZmanTypes] /*.concat(settings.customZmanim)*/;
321
+ static getAllZmanim(date, location) {
322
+ const { sdate, jdate } = Utils_1.Utils.bothDates(date);
323
+ return ZmanimUtils.getZmanTimes(ZmanTypes_1.ZmanTypes, sdate, jdate, location);
391
324
  }
392
325
  }
393
- AppUtils.zmanTimesCache = [];
394
- exports.default = AppUtils;
326
+ ZmanimUtils.zmanTimesCache = [];
327
+ exports.default = ZmanimUtils;
328
+ //# sourceMappingURL=ZmanimUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZmanimUtils.js","sourceRoot":"","sources":["../../src/JCal/ZmanimUtils.ts"],"names":[],"mappings":";;;;;;AAAA,oCAA2C;AAC3C,sDAA8B;AAG9B,4CAAmE;AAgBtD,QAAA,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,GAAG;CACd,CAAC,CAAC;AAEH,MAAqB,WAAW;IAG5B;;;;;;;OAOG;IACH,MAAM,CAAC,YAAY,CAAC,SAAuB,EAAE,IAAU,EAAE,KAAY,EAAE,QAAkB;QACrF,MAAM,GAAG,GAAG,WAAW,CAAC,cAAc,CAAC,IAAI,CACvC,CAAC,CAAC,EAAE,EAAE,CACF,aAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC;YAC/B,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ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ewish Date the day before a yomtov that contains a Friday?*/
125
125
  hasEiruvTavshilin(israel: boolean): boolean;
126
126
  /**Gets the candle lighting time for the current Jewish date for the given Location object.*/
127
- getCandleLighting(location: Location, nullIfNoCandles: boolean): import("../jcal-zmanim").Time | null | undefined;
127
+ getCandleLighting(location: Location, nullIfNoCandles: boolean): import("../jcal-zmanim.js").Time | null | undefined;
128
128
  /**Get the sedra of the week for the current Jewish date.*/
129
129
  getSedra(israel: boolean): Sedra;
130
130
  /**Get the prakim of Pirkei Avos for the current Jewish date.*/
@@ -132,11 +132,11 @@ export default class jDate {
132
132
  /**Gets sunrise and sunset time for the current Jewish date at the given Location.
133
133
  *
134
134
  * Return format: {sunrise: {hour: 6, minute: 18}, sunset: {hour: 19, minute: 41}}*/
135
- getSunriseSunset(location: Location, ignoreElevation?: boolean): import("../jcal-zmanim").SunTimes;
135
+ getSunriseSunset(location: Location, ignoreElevation?: boolean): import("../jcal-zmanim.js").SunTimes;
136
136
  /**Gets Chatzos for both the day and the night for the current Jewish date at the given Location.
137
137
  *
138
138
  *Return format: {hour: 11, minute: 48}*/
139
- getChatzos(location: Location): import("../jcal-zmanim").Time;
139
+ getChatzos(location: Location): import("../jcal-zmanim.js").Time;
140
140
  /**Gets the length of a single Sha'a Zmanis in minutes for the current Jewish date at the given Location.*/
141
141
  getShaaZmanis(location: Location, offset: number): number;
142
142
  /**Returns the daily daf in English. For example: Sukkah, Daf 3.*/
@@ -201,3 +201,4 @@ export default class jDate {
201
201
  /**number of months in Jewish Year.*/
202
202
  static monthsJYear(year: number): number;
203
203
  }
204
+ //# sourceMappingURL=jDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jDate.d.ts","sourceRoot":"","sources":["../../src/JCal/jDate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,YAAY,CAAC;AAI/B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAgBlC,sDAAsD;AACtD,MAAM,CAAC,OAAO,OAAO,KAAK;IACf,G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