jcal-zmanim 1.0.4 → 1.0.9

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 (84) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +335 -2
  3. package/{build → dist}/AppUtils.d.ts +3 -3
  4. package/dist/AppUtils.d.ts.map +1 -0
  5. package/{build → dist}/AppUtils.js +9 -5
  6. package/dist/AppUtils.js.map +1 -0
  7. package/{build → dist}/GeneralUtils.d.ts +1 -0
  8. package/dist/GeneralUtils.d.ts.map +1 -0
  9. package/{build → dist}/GeneralUtils.js +1 -0
  10. package/dist/GeneralUtils.js.map +1 -0
  11. package/{build → dist}/JCal/Dafyomi.d.ts +4 -3
  12. package/dist/JCal/Dafyomi.d.ts.map +1 -0
  13. package/{build → dist}/JCal/Dafyomi.js +4 -3
  14. package/dist/JCal/Dafyomi.js.map +1 -0
  15. package/{build → dist}/JCal/Location.d.ts +4 -4
  16. package/dist/JCal/Location.d.ts.map +1 -0
  17. package/{build → dist}/JCal/Location.js +10 -12
  18. package/dist/JCal/Location.js.map +1 -0
  19. package/{build → dist}/JCal/Molad.d.ts +1 -1
  20. package/dist/JCal/Molad.d.ts.map +1 -0
  21. package/{build → dist}/JCal/Molad.js +1 -1
  22. package/dist/JCal/Molad.js.map +1 -0
  23. package/{build → dist}/JCal/PirkeiAvos.d.ts +1 -0
  24. package/dist/JCal/PirkeiAvos.d.ts.map +1 -0
  25. package/{build → dist}/JCal/PirkeiAvos.js +1 -0
  26. package/dist/JCal/PirkeiAvos.js.map +1 -0
  27. package/{build → dist}/JCal/Sedra.d.ts +1 -0
  28. package/dist/JCal/Sedra.d.ts.map +1 -0
  29. package/{build → dist}/JCal/Sedra.js +1 -0
  30. package/dist/JCal/Sedra.js.map +1 -0
  31. package/{build → dist}/JCal/Utils.d.ts +1 -0
  32. package/dist/JCal/Utils.d.ts.map +1 -0
  33. package/{build → dist}/JCal/Utils.js +1 -0
  34. package/dist/JCal/Utils.js.map +1 -0
  35. package/{build → dist}/JCal/Zmanim.d.ts +1 -0
  36. package/dist/JCal/Zmanim.d.ts.map +1 -0
  37. package/{build → dist}/JCal/Zmanim.js +1 -0
  38. package/dist/JCal/Zmanim.js.map +1 -0
  39. package/{build → dist}/JCal/jDate.d.ts +1 -0
  40. package/dist/JCal/jDate.d.ts.map +1 -0
  41. package/{build → dist}/JCal/jDate.js +1 -0
  42. package/dist/JCal/jDate.js.map +1 -0
  43. package/dist/Locations.d.ts +31 -0
  44. package/dist/Locations.d.ts.map +1 -0
  45. package/dist/Locations.js +119 -0
  46. package/dist/Locations.js.map +1 -0
  47. package/{build → dist}/Notifications.d.ts +1 -0
  48. package/dist/Notifications.d.ts.map +1 -0
  49. package/{build → dist}/Notifications.js +1 -0
  50. package/dist/Notifications.js.map +1 -0
  51. package/{build → dist}/Settings.d.ts +9 -0
  52. package/dist/Settings.d.ts.map +1 -0
  53. package/{build → dist}/Settings.js +9 -0
  54. package/dist/Settings.js.map +1 -0
  55. package/{build → dist}/ZmanTypes.d.ts +11 -4
  56. package/dist/ZmanTypes.d.ts.map +1 -0
  57. package/{build → dist}/ZmanTypes.js +12 -5
  58. package/dist/ZmanTypes.js.map +1 -0
  59. package/dist/index.d.ts +2 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/{build → dist}/index.js +4 -1
  62. package/dist/index.js.map +1 -0
  63. package/dist/locations.json +1 -0
  64. package/package.json +40 -33
  65. package/build/Locations.d.ts +0 -7
  66. package/build/Locations.js +0 -1308
  67. package/build/index.d.ts +0 -1
  68. package/src/AppUtils.ts +0 -500
  69. package/src/GeneralUtils.ts +0 -84
  70. package/src/JCal/Dafyomi.ts +0 -139
  71. package/src/JCal/Location.ts +0 -100
  72. package/src/JCal/Molad.ts +0 -105
  73. package/src/JCal/PirkeiAvos.ts +0 -180
  74. package/src/JCal/Sedra.ts +0 -215
  75. package/src/JCal/Utils.ts +0 -732
  76. package/src/JCal/Zmanim.ts +0 -270
  77. package/src/JCal/jDate.ts +0 -714
  78. package/src/Locations.ts +0 -1303
  79. package/src/Notifications.ts +0 -1243
  80. package/src/Settings.ts +0 -103
  81. package/src/ZmanTypes.ts +0 -184
  82. package/src/index.ts +0 -31
  83. package/src/jcal-zmanim.d.ts +0 -4
  84. package/tsconfig.json +0 -109
package/README.md CHANGED
@@ -1,2 +1,335 @@
1
- # jCal
2
- A very complete JavaScript library for the Jewish Calendar.
1
+ # jcal-zmanim
2
+ A very complete JavaScript library for the Jewish Calendar.
3
+ - [jcal-zmanim](#jcal-zmanim)
4
+ - [To add *jcal-zmanim* to your project](#to-add-jcal-zmanim-to-your-project)
5
+ - [Some basic uses of *jcal-zmanim*](#some-basic-uses-of-jcal-zmanim)
6
+ - [The jDate object](#the-jdate-object)
7
+ - [Creating a jDate instance](#creating-a-jdate-instance)
8
+ - [jDate instance, properties and functions](#jdate-instance-properties-and-functions)
9
+ - [jDate static properties and functions](#jdate-static-properties-and-functions)
10
+ - [The Location Object](#the-location-object)
11
+ - [Finding a Location](#finding-a-location)
12
+ - [Location properties and functions](#location-properties-and-functions)
13
+ - [Creating a new Location](#creating-a-new-location)
14
+ - [The Zmanim Object](#the-zmanim-object)
15
+ - [The Sedra Object](#the-sedra-object)
16
+ - [The AppUtils Functions](#the-apputils-functions)
17
+
18
+ ### To add *jcal-zmanim* to your project
19
+ ```node
20
+ npm install jcal-zmanim
21
+ ```
22
+ ### Some basic uses of *jcal-zmanim*
23
+ ##### Print out todays Jewish Date
24
+ ```javascript
25
+ import {jDate} from "jcal-zmanim";
26
+
27
+ const today = jDate.now();
28
+ console.log(today.toString());
29
+ ```
30
+ The above code prints out:
31
+ > Thursday, the 23rd of Kislev 5784
32
+ ##### Get the *Daf Yomi* for today
33
+ ```javascript
34
+ import {jDate} from "jcal-zmanim";
35
+
36
+ //Prints out todays daf: "Baba Kamma, Daf 6"
37
+ console.log(jDate.now().getDafYomi());
38
+ ```
39
+ ##### Print out the sunrise and sunset times for 11/10/23 in Dallas
40
+ ```javascript
41
+ import {jDate, findLocation, Utils} from "jcal-zmanim";
42
+
43
+ //Get the Jewish Date for November 10th, 2023.
44
+ const jd = new jDate("November 10 2023");
45
+
46
+ //Gets us Dallas Texas...
47
+ const dallas = findLocation('Dallas');
48
+
49
+ //Acquire the sunrise and sunset times for this date in Dallas
50
+ const {sunrise, sunset} = jd.getSunriseSunset(dallas);
51
+
52
+ //Print it out nicely formatted to the console
53
+ console.log(`In ${dallas.Name} on ${jd.toString()}, Sunrise is at ${Utils.getTimeString(sunrise)}, and Sunset is at ${Utils.getTimeString(sunset)}`);
54
+ ```
55
+ The code above prints out to the console:
56
+ >In Dallas, TX on Erev Shabbos, the 26th of Cheshvan 5784, Sunrise is at 6:53:36 AM, and Sunset is at 5:28:59 PM
57
+ ##### Get the current Jewish Date in Hong Kong - taking into consideration that it may be after sunset there right now.
58
+ ```javascript
59
+ import {findLocation, jDate, Utils} from jcal-zmanim
60
+
61
+ //Get Hong Kong
62
+ const hongKong= findLocation('Hong Kong');
63
+
64
+ //Get the Jewish Date right now in Hong Kong
65
+ const nowInHongKong = Utils.nowAtLocation(hongKong);
66
+
67
+ //Print it out
68
+ console.log(nowInHongKong.toString());
69
+ ```
70
+
71
+ ##### Print out the candle lighting time for Dallas Texas on Friday November 10th 2023:
72
+ ```javascript
73
+ import {jDate, findLocation, Utils} from "jcal-zmanim";
74
+
75
+ //Get the Jewish Date for Friday, the 10th of November, 2023.
76
+ const erevShabbos = new jDate("November 10 2023");
77
+
78
+ //Get Dallas...
79
+ const dallas = findLocation('Dallas');
80
+
81
+ //Get the candle-lighting time
82
+ const candles = erevShabbos.getCandleLighting(dallas);
83
+
84
+ //Spit in out formatted nicely...
85
+ console.log(`Candle lighting time in ${dallas.Name} on ${erevShabbos.toString()} is at ${Utils.getTimeString(candles)}`);
86
+ ```
87
+ The code above, prints out to the console:
88
+ > Candle lighting time in Dallas, TX on Erev Shabbos, the 26th of Cheshvan 5784 is at 5:10:59 PM
89
+
90
+
91
+
92
+ ## The jDate object
93
+
94
+ A *jDate* is a single day in the Jewish Calendar.<br>
95
+ It is used as the basic date unit throughout jcal-zmanim.
96
+
97
+ ```javascript
98
+ import {jDate} from "jcal-zmanim"
99
+
100
+ //The following will create a Jewish Date object for todays Date.
101
+ const jdate = new jDate();
102
+
103
+ //The following will output the above Jewish Date in the format: Thursday, the 3rd of Kislev 5784.
104
+ console.log(jdate.toString());
105
+ ```
106
+ ### Creating a jDate instance
107
+ A jDate can be created in a number of ways:
108
+ #### Create a jDate using the jDate constructor
109
+ - `const jdate = new jDate()` - Sets the Jewish Date for the current system date
110
+ - `const jdate = new jDate(javascriptDateObject)` - Sets to the Jewish date on the given Gregorian date
111
+ - `const jdate = new jDate("January 1 2045")` - Accepts any valid javascript Date string (uses JavaScript's new Date(string))
112
+ - `const jdate = new jDate(jewishYear, jewishMonth, jewishDay)` - Months start at 1. Nissan is month 1 Adar Sheini is 13.
113
+ - `const jdate = new jDate(jewishYear, jewishMonth)` - Same as above, with Day defaulting to 1
114
+ - `const jdate = new jDate( { year: 5776, month: 4, day: 5 } )` - same as new jDate(jewishYear, jewishMonth, jewishDay)
115
+ - `const jdate = new jDate( { year: 5776, month: 4 } )` - same as new jDate(jewishYear, jewishMonth)
116
+ - `const jdate = new jDate( { year: 5776 } )` - sets to the first day of Rosh Hashana on the given year
117
+ - `const jdate = new jDate(absoluteDate)` - The number of days elapsed since the theoretical date Sunday, December 31, 0001 BCE
118
+ - `const jdate = new jDate(jewishYear, jewishMonth, jewishDay, absoluteDate)` - Most efficient constructor. Needs no calculations at all.
119
+ - `const jdate = new jDate( { year: 5776, month: 4, day: 5, abs: 122548708 } )` - same as new jDate(jewishYear, jewishMonth, jewishDay, absoluteDate)
120
+
121
+ #### Create a jDate using the static *toJDate* function
122
+
123
+ - `jDate.toJDate()` OR `jDate.now()` - To get the current Jewish Date.
124
+ ```javascript
125
+ //To print out the current Jewish Date in English.
126
+ console.log(jDate.toJDate().toString());
127
+ //A shortcut to get the current jDate.
128
+ const currentJDate = jDate.now();
129
+ //To print out the current Jewish Date in Hebrew:
130
+ console.log(jDate.now().toStringHeb());
131
+ ```
132
+ - `jDate.toJDate(Date)` - Sets to the Jewish date on the given Javascript Date object
133
+ - `jDate.toJDate("January 1 2045")` - Accepts any valid Javascript Date string (uses string constructor of Date object)
134
+ ```javascript
135
+ //To print out the Jewish Date for January 3rd 2026.
136
+ console.log(jDate.toJDate(new Date(2026, 0, 3)).toString());
137
+
138
+ //To print out the Jewish Date for March 23rd 2027:
139
+ console.log(jDate.toJDate('March 23 2027').toString());
140
+ ```
141
+ - `jDate.toJDate(jewishYear, jewishMonth, jewishDay)` - Months start at 1. *Nissan* is month 1, and *Adar Sheini* is 13.
142
+ ```javascript
143
+ //To print out the Jewish Date for the 6th day of Kislev 5785 in Hebrew:
144
+ console.log(jDate.toJDate(5785, 11, 6).toStringHeb());
145
+ //Prints out: יום שלישי ו שבט תשפ"ה
146
+ ```
147
+ - `jDate.toJDate(jewishYear, jewishMonth)` - Same as above, with Day defaulting to 1
148
+ - `jDate.toJDate(jewishYear)` - sets to the first day of *Rosh Hashana* on the given year
149
+ - `jDate.toJDate( { year: 5776, month: 4, day: 5 } )` - Months start at 1. Nissan is month 1 Adara Sheini is 13.
150
+ - `jDate.toJDate( { year: 5776, month: 4 } )` - Same as above, with Day defaulting to 1
151
+ - `jDate.toJDate( { year: 5776 } )` - sets to the first day of *Rosh Hashana* on the given year
152
+ - `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.
153
+ - `jDate.toJDate( { year: 5776, month: 4, day: 5, abs: 122548708 } ) `- same as `jDate.toJDate(jewishYear, jewishMonth, jewishDay, absoluteDate)`
154
+ ------------------------------------------------------------------
155
+ ### jDate instance, properties and functions
156
+
157
+ | Property | Return Type | Description |
158
+ | ---: | :---: | :--- |
159
+ | **Day** | `number` | The day of the Jewish month. Starts from 1. Maximum can be 29 or 30. |
160
+ | **Month** | `number` | The month of the Jewish year. Nissan is month number 1 and Adar Sheini is 13. |
161
+ | **Year** | `number` |The Jewish year. Valid values are 1 - 6000 |
162
+ | **Abs** | `number` | The number of days elapsed since the theoretical date Sunday, December 31, 0001 BCE. |
163
+ | **DayOfWeek** |`number`| The day of the week for the current Jewish date. Sunday is 0 and *Shabbos* is 6. |
164
+ | **getDate()** | `Date` | Returns the javascript Date of this jDate.<br />This represents the Gregorian date that starts at midnight of the current Jewish Date. |
165
+ | **toString(hideDayOfWeek?, dontCapitalize?)** | `string` | Returns the current Jewish date in the format: "*Thursday, the 3rd of Kislev 5776*".<br />If *hideDayOfWeek* is truthy, the day of the week is left out.<br />If *dontCapitalize* is truthy and *hideDayOfWeek* is truthy, the 't' of "The 3rd etc." will be a regular 't', otherwise it will be a 'T'. This parameter has no effect when *hideDayOfWeek* is falsey. |
166
+ | **toShortstring(showDayOfWeek?)**| `string` | Returns the current Jewish date in the format "*Nissan 3, 5778*".<br />If showDayOfWeek is truthy, "*Tuesday Nissan 3, 5778*" is returned. |
167
+ |**toStringHeb()**|`string`|Returns the current Jewish date in the format:<br />*"יום חמישי כ"א כסלו תשע"ו"*|
168
+ | **addDays(numberOfDays)** | `jDate` | Returns a new Jewish Date by adding the given number of days to the current Jewish date. |
169
+ | **addMonths(numberOfMonths)** | `jDate` | Returns a new Jewish date by adding the given number of Jewish Months to the current Jewish date.<br />If the current Day is 30 and the new month only has 29 days, the 29th day of the month is returned. |
170
+ | **addYears(numberOfYears)** | `jDate` | Returns a new Jewish date represented by adding the given number of Jewish Years to the current Jewish date.<br />If the current Day is 30 and the new dates month only has 29 days, the 29th day of the month is returned. |
171
+ | **addSecularMonths(numberOfMonths)** | `jDate` | Adds the given number of months to the Secular Date of this jDate and returns the result as a jDate |
172
+ | **addSecularYears(numberOfYears)** | `jDate` | Adds the given number of years to the Secular Date of this jDate and returns the result as a jDate |
173
+ | **diffDays(otherJDate)** | `number` | Gets the number of days separating this Jewish Date and the given one.<br />If the given date is before this one, the number will be negative. |
174
+ | **diffMonths(otherJDate)** | `number` | Gets the number of months separating this Jewish Date and the given one.<br /> Ignores the Day property:<br />`jDate.toJDate(5777, 6, 29).diffMonths(jDate.toJDate(5778, 7, 1))`<br />will return 1 even though they are a day apart.<br />If the given date is before this one, the number will be negative. |
175
+ | **diffYears(otherJDate)** | `number` | Gets the number of years separating this Jewish Date and the given one.<br /> Ignores the Day and Month properties:<br /> `jDate.toJDate(5777, 6, 29).diffYears(jDate.toJDate(5778, 7, 1))` will return 1 even though they are a day apart.<br/> If the given date is before this one, the number will be negative. |
176
+ | **monthName(showYear? [=true])** | `string` | Returns the current Jewish date in the format "*Nissan 5778*".<br />If *showYear* === false, than just "*Nissan*" is returned. |
177
+ |**getDayOfOmer()**|`number`|Gets the day of the omer for the current Jewish date. If the date is not during *sefira*, 0 is returned.|
178
+ |**isYomTovOrCholHamoed(inIsrael?)**|`boolean`|Returns true if this day is *yomtov* or *chol hamoed*<br />If *inIsrael* is truthy, then the function will keep 1 day of *yomtov*.|
179
+ |**isYomTov(inIsrael?)**|`boolean`|Returns true if this day is *yomtov*.<br />If *inIsrael* is truthy, then the function will keep 1 day of *yomtov*.|
180
+ | **isErevYomTov()**|`boolean`|Is this day *Erev Yom Tov*? (includes *Erev* second days of *Sukkos* and *Pesach*)|
181
+ |**hasCandleLighting()**|`boolean`|Does the current Jewish date have candle lighting before sunset?<br />Note, on Friday that is *Yomtov*, this will return true.<br />For *Shabbos* when *Yomtov* is on Sunday, this will return false, as candles cannot be lit until after *Shabbos* is over.|
182
+ |**hasEiruvTavshilin(inIsrael?)**|boolean|Is the current Jewish Date the day before a *Yomtov* that contains a Friday?|
183
+ |**getCandleLighting([location](#the-location-object), nullIfNoCandles?)**|`{hour: 10, minute: 36, second: 15}`|Gets the candle lighting time for the current Jewish date for the given [Location](#the-location-object).<br />If the current day does not have candle lighting:<ul><li>If *nullIfNoCandles* is truthy, _null_ is returned.<li>Otherwise, a string is returned: *"No candle lighting on Thursday, the 3rd of Kislev 5776"*</ul>|
184
+ |**getSedra(inIsrael?)**|[Sedra](#the-sedra-object)|Get the [*Sedra*](#the-sedra-object) of the week for the current Jewish date.|
185
+ | **getPirkeiAvos(inIsrael?)** |`number[]`|Gets the *Prakim* of *Pirkei Avos* for the current *Shabbos*.<br/> If the current jDate is not Shabbos, or is during the winter months - where there is no *Pirkei Avos*, an empty array is returned.|
186
+ |**getSunriseSunset([location](#the-location-object), ignoreElevation?)**|`{sunrise: {hour: 6, minute: 18}, sunset: {hour: 19, minute: 41}}`|Gets sunrise and sunset time for the current Jewish date at the given [Location](#the-location-object).<br>If *ignoreElevation* is true, the calculations used to determine the sunrise and sunset, will assume that the Location is at sea level.<br>This is necessary for determining some of the daily *Zmanim*.|
187
+ | **getChatzos([location](#the-location-object))**|`{hour: 11, minute: 48}`|Gets Chatzos for both the day and the night for the current Jewish date at the given [Location](#the-location-object).|
188
+ |**getShaaZmanis**([location](#the-location-object), offset)|`number`|Gets the length in minutes for a single *Sha'a Zmanis* for the current Jewish date at the given [Location](#the-location-object).<br />By default, a *Sha'a Zmanis* is the total number of minutes from sunrise to sunset divided by 12.<br />To calculate from 72 minutes before sunrise to 72 minutes after sunset, set the *offset* parameter to 72.|
189
+ |**getDafYomi()**|`string`|Returns the daily daf in English. For example: "*Sukkah, Daf 3*".|
190
+ |**getDafyomiHeb()**|`string`|Gets the daily daf in Hebrew. For example:<br />*"'סוכה דף כ"*|
191
+ ------------------------------------------------------------------
192
+ ### jDate static properties and functions
193
+ | Property | Return Type | Description |
194
+ | ---: | :---: | :--- |
195
+ |[**jDate.toJDate(....)**](#create-a-jdate-using-the-static-tojdate-function)|`jDate`|[See all parameter options here...](#create-a-jdate-using-the-static-tojdate-function)|
196
+ |**jDate.now()**|`jDate`|Returns the current jDate. Shortcut for `jDate.toJDate()`|
197
+ |**jDate.fromAbs(absoluteDate)**|`jDate`|Calculates the Jewish Date for the given absolute date.<br />The absoluteDate is the number of days elapsed since the theoretical date Sunday, December 31, 0001 BCE.|
198
+ |**jDate.absSd(Date)**|`number`|Gets the absolute date of the given javascript Date object.|
199
+ |**jDate.absJd(jewishYear, jewishMonth, jewishDay)**|`number`|Calculate the absolute date for the given Jewish Date.<br>For the *jewishMonth*, *Nissan* is 1 and *Adar Sheini* is 13.|
200
+ |**jDate.sdFromAbs(absoluteDate)**|`Date`|Gets a javascript Date from an absolute date.|
201
+ |**jDate.daysJMonth(jewishYear, jewishMonth)**|`number`|The number of days in the given Jewish Month.<br>*Nissan* is 1 and *Adar Sheini* is 13.|
202
+ |**jDate.daysJYear(jewishYear)**|`number`|The number of days in the given Jewish Year.|
203
+ |**jDate.isLongCheshvan(jewishYear)**|`boolean`|Does *Cheshvan* for the given Jewish Year have 30 days?|
204
+ |**jDate.isShortKislev(jewishYear)** |`boolean`|Does Kislev for the given Jewish Year have 29 days?|
205
+ |**jDate.isJdLeapY(jewishYear)**|`boolean`|Does the given Jewish Year have 13 months?|
206
+ |**jDate.monthsJYear(jewishYear)**|`number`|The number of months in the given Jewish Year.|
207
+ ------------------------------------------------------------------
208
+ ## The Location Object
209
+
210
+ The city or location.<br>
211
+ This is very important for calculating any *Zmanim*, as sunset and sunrise are different for every city.<br>
212
+ In addition, there are different *Minhagim* in different cities.<br>A major example of this would be, in Eretz Yisroel, one day of *Yom Tov* is observed, while everywhere else, two days are kept.
213
+
214
+ ##### To acquire the entire list of Locations:
215
+ ```javascript
216
+ import {Locations} from "jcal-zmanim";
217
+
218
+ //Prints out the entire list of all 1,288 Location objects
219
+ for(let location of Locations) {
220
+ console.log(location);
221
+ }
222
+ ```
223
+ ### Finding a Location
224
+
225
+ To search for a Location object for anywhere in the world, import and use the `findLocation` function.
226
+ ##### To acquire the entire list of Locations:
227
+ ```javascript
228
+ import {findLocation} from "jcal-zmanim";
229
+
230
+ //By city name
231
+ const myCity = findLocation('Jersusalem');
232
+
233
+ //Or in Hebrew
234
+ const myCityHebrew = findLocation('ירושלים');
235
+
236
+ //Or by coordinates
237
+ const cityByCoords = findLocation({latitude: 31.77, longitude: -35.23});
238
+
239
+ //The coordinates do not have to be exact. The function will find the closest Location to the given coordinates.
240
+ const closeToJerusalem = findLocation({latitude: 31.75, longitude: -35.2});
241
+ ```
242
+ ##### There are 2 ways to search for a Location:
243
+ - `const location = findLocation(locationName)` - Finds a Location with the given name.<br />If no exact match is found, the location with the name most similar to the supplied locationName will be returned.<br>**Note:** The algorithm for this is fairly imprecise, so check to make sure that you have acquired the correct location.<br />If the location is in Israel, typing the name in Hebrew may help find the Location.
244
+ - `const location = findLocation(locationCoordinates)` - find a Location by supplying the coordinates in the format: `{latitude: 31.5, longitude: -32.54}`. The numbers are degree decimals.<br /> For latitude, North is a positive number and South is a negative number.<br /> For longitude, West is a positive number, and East is a negative number.<br /> If no Location is found with those exact coordinates, the Location closest to the supplied coordinates is returned.
245
+
246
+ ### Location properties and functions
247
+ | Property | Return Type | Description |
248
+ | ---: | :---: | :--- |
249
+ |**Name**|`string`|The name of the Location.|
250
+ |**NameHebrew**|`string`|The name of the Location in Hebrew. Only available for Locations in Israel.|
251
+ |**Israel**|`boolean`|Is this Location in Israel?|
252
+ |**Latitude**|`number`|The *degree decimal* for the Locations latitude.<br>North is a positive number and South is a negative number.|
253
+ |**Longitude**|`number`|The *degree decimal* for the Locations longitude.<br>West is a positive number and East is a negative number.|
254
+ |**UTCOffset**|`number`|The time zone. Israel is 2 and New York is -5.|
255
+ |**Elevation**|`number`|Elevation in meters.<br>To convert from meters to feet, each meter is 3.2808 feet. |
256
+ |**CandleLighting**|`number`|Number of minutes before sunset the candles are lit on Friday|
257
+ |**Location.getJerusalem()**|`Location`|Static function that gets us the Location for Yerushalayim.|
258
+ |**Location.getLakewood()**|`Location`|Static function that gets us the Location for Lakewood NJ.|
259
+
260
+ ### Creating a new Location
261
+ ##### To create a Location for anywhere in the world, use the Location object constructor:
262
+ ```javascript
263
+ import {Location} from "jcal-zmanim";
264
+
265
+ const myLocation = new Location(
266
+ 'Nowhere', //The location name
267
+ 'יהופיץ', //The name in Hebrew.
268
+ false, //This place is not in Israel
269
+ 35.01 //The latitude. South is negative.
270
+ -155.23, //The longitude. East is negative.
271
+ 11, //The Time Zone: The number of hours offset from UTC.
272
+ 1106, //The elevation in Meters. (Feet x 3.2808)
273
+ 18) //The number of minutes before sunset candles are lit on Erev Shabbos.
274
+ );
275
+ ```
276
+ ## The Zmanim Object
277
+ Contains functions to calculate the daily *Zmanim* for any location in the world.
278
+ ```javascript
279
+ import {findLocation, jDate, Zmanim} from "jcal-zmanim";
280
+
281
+ //The following code gets Sunset, Sunrise and Chatzos for Lakewood NJ on Purim 5789.
282
+
283
+ const lakewood = findLocation('Lakewood');
284
+ const purim = new jDate(5789,12, 14);
285
+ const {sunset, sunrise} = Zmanim.getSunTimes(purim, lakewood);
286
+ const chatzos = Zmanim.getChatzos(purim, lakewood);
287
+
288
+ console.log(`Sunset: ${Utils.getTimeString(sunset)}`);
289
+ console.log(`Sunrise: ${Utils.getTimeString(sunrise)}`);
290
+ console.log(`chatzos: ${Utils.getTimeString(chatzos)}`);
291
+ ```
292
+ The code above prints out:
293
+ >Sunset: 5:49:02 PM<br>
294
+ >Sunrise: 6:29:49 AM<br>
295
+ >chatzos: 12:09:25 PM
296
+
297
+ ##### To get all the *Halachic Zmanim* for a given day and Location use the [**AppUtils**](#the-apputils-functions) function:
298
+ ```javascript
299
+ import {findLocation, jDate, AppUtils, Utils} from jcal-zmanim;
300
+
301
+ const lakewood = findLocation('Lakewood');
302
+ const purim = new jDate(5789,12, 14);
303
+
304
+ //This will return ar array of Zmanim in the format:
305
+ //[{zmanType:{desc}, time: {hour, minute, second}}]
306
+ const allZmanim = AppUtils.getAllZmanim(purim, lakewood);
307
+
308
+ for(let zman of allZmanim) {
309
+ console.log(`${zman.zmanType.desc}: ${Utils.getTimeString(zman.time)}`)
310
+ }
311
+ ```
312
+ The code above prints out:
313
+ > Chatzos - Midnight: 12:09:25 AM<br>
314
+ > Alos Hashachar - 90: 4:59:49 AM<br>
315
+ > Alos Hashachar - 72: 5:17:49 AM<br>
316
+ > Taliss and Tefillin: 5:53:49 AM<br>
317
+ > Sunrise at current elevation: 6:29:49 AM<br>
318
+ > Sunrise: 6:29:49 AM<br>
319
+ > Zman Krias Shma - MG"A: 8:33:49 AM<br>
320
+ > Zman Krias Shma - GR"A: 9:18:49 AM<br>
321
+ > Zman Tefilla - MG"A: 9:45:49 AM<br>
322
+ > Zman Tefilla - GR"A: 10:15:49 AM<br>
323
+ > Chatzos - Midday: 12:09:25 PM<br>
324
+ > Mincha Gedola: 12:37:25 PM<br>
325
+ > Mincha Ketana: 3:26:49 PM<br>
326
+ > Plag HaMincha: 4:37:49 PM<br>
327
+ > Sunset at sea level: 5:49:02 PM<br>
328
+ > Sunset: 5:49:02 PM<br>
329
+ > Nightfall - 45: 6:34:02 PM<br>
330
+ > Nightfall - 50: 6:39:02 PM<br>
331
+ > Rabbeinu Tam: 7:01:02 PM<br>
332
+ > Rabbeinu Tam - Zmanios: 6:56:02 PM<br>
333
+ > Rabbeinu Tam - Zmanios MG"A: 7:14:02 PM
334
+ ## The Sedra Object
335
+ ## The AppUtils Functions
@@ -85,12 +85,11 @@ export default class AppUtils {
85
85
  };
86
86
  /**
87
87
  * Returns all the zmanim for the given day
88
- * @param {jDate} jdate
89
- * @param {Date} sdate
88
+ * @param {Date|jDate} date
90
89
  * @param {Location} location
91
90
  * @returns {{zmanType:ZmanToShow, time?:Time }[]}
92
91
  */
93
- static getAllZmanim(jdate: jDate, sdate: Date, location: Location): {
92
+ static getAllZmanim(date: jDate | Date, location: Location): {
94
93
  zmanType: ZmanToShow;
95
94
  time?: Time | undefined;
96
95
  }[];
@@ -107,3 +106,4 @@ export default class AppUtils {
107
106
  static AllZmanTypes(settings: Settings): ZmanToShow[];
108
107
  }
109
108
  export {};
109
+ //# sourceMappingURL=AppUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppUtils.d.ts","sourceRoot":"","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E,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;;;;;;OAMG;IACH,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ;;;;;;IAoBvE;;;;;MAKE;IACF,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ;;;;IAO1D;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU;IAW5D;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ;CAGzC"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.WhichDaysFlags = exports.DaysOfWeek = void 0;
7
7
  const Utils_1 = __importDefault(require("./JCal/Utils"));
8
8
  const Zmanim_1 = __importDefault(require("./JCal/Zmanim"));
9
+ const jDate_1 = __importDefault(require("./JCal/jDate"));
9
10
  const ZmanTypes_1 = require("./ZmanTypes");
10
11
  exports.DaysOfWeek = Object.freeze({
11
12
  SUNDAY: 0,
@@ -317,7 +318,7 @@ class AppUtils {
317
318
  * @param {Location} location
318
319
  */
319
320
  static getWhichDays(date, jdate, location) {
320
- if (jdate.isYomTov(location.Israel)) {
321
+ if (jdate.isYomTov(!!location.Israel)) {
321
322
  return exports.WhichDaysFlags.YOMTOV;
322
323
  }
323
324
  switch (date.getDay()) {
@@ -361,13 +362,15 @@ class AppUtils {
361
362
  }
362
363
  /**
363
364
  * Returns all the zmanim for the given day
364
- * @param {jDate} jdate
365
- * @param {Date} sdate
365
+ * @param {Date|jDate} date
366
366
  * @param {Location} location
367
367
  * @returns {{zmanType:ZmanToShow, time?:Time }[]}
368
368
  */
369
- static getAllZmanim(jdate, sdate, location) {
370
- return AppUtils.getZmanTimes(ZmanTypes_1.ZmanTypes, sdate, jdate, location);
369
+ static getAllZmanim(date, location) {
370
+ const jd = date instanceof Date
371
+ ? new jDate_1.default(date)
372
+ : date;
373
+ return AppUtils.getZmanTimes(ZmanTypes_1.ZmanTypes, jd.getDate(), jd, location);
371
374
  }
372
375
  /**
373
376
  * Compares two zmanim for showing to see if they are the same
@@ -392,3 +395,4 @@ class AppUtils {
392
395
  }
393
396
  AppUtils.zmanTimesCache = [];
394
397
  exports.default = AppUtils;
398
+ //# sourceMappingURL=AppUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppUtils.js","sourceRoot":"","sources":["../src/AppUtils.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAiC;AACjC,2DAAmC;AAGnC,yDAAiC;AACjC,2CAAkE;AAiBrD,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;CACb,CAAC,CAAC;AAEU,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,QAAQ;IAGzB;;;;;;;;;OASG;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAW,EAAE,KAAY,EAAE,IAAU,EAAE,QAAkB,EAAE,MAAY;QAC9F,MAAM,cAAc,GAAG,EAAE,EACrB,SAAS,GA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AAC,YAAY,CAAC,QAAkB;QAClC,OAAO,CAAC,GAAG,qBAAS,CAAC,CAAA,kCAAkC,CAAC;IAC5D,CAAC;;AAxcM,uBAAc,GAAe,EAAE,CAAC;kBADtB,QAAQ"}
@@ -41,3 +41,4 @@ export declare function warn(txt: string, ...optionalItems: any[]): void;
41
41
  * @param {*} txt
42
42
  */
43
43
  export declare function error(txt: string, ...optionalItems: any[]): void;
44
+ //# sourceMappingURL=GeneralUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeneralUtils.d.ts","sourceRoot":"","sources":["../src/GeneralUtils.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,WAEtC;AACD,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,WAEtC;AACD,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,WAEzC;AACD;;6HAE6H;AAC7H,wBAAgB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,GAAG,EAAE,OAAO,EAAE,WAMhD;AACD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,WAUhE;AACD;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,YAKhD;AACD;;;GAGG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,GAAG,EAAE,QAIvD;AACD;;;GAGG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,GAAG,EAAE,QAIxD;AACD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,GAAG,EAAE,QAIzD"}
@@ -91,3 +91,4 @@ function error(txt, ...optionalItems) {
91
91
  }
92
92
  }
93
93
  exports.error = error;
94
+ //# sourceMappingURL=GeneralUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeneralUtils.js","sourceRoot":"","sources":["../src/GeneralUtils.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAEvD,4EAA4E;AAC5E,SAAgB,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,CAAC;AAChE,CAAC;AAFD,4BAEC;AACD,8EAA8E;AAC9E,SAAgB,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,CAAC;AAChE,CAAC;AAFD,4BAEC;AACD,uEAAuE;AACvE,SAAgB,WAAW,CAAC,KAAc;IACtC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC;AAFD,kCAEC;AACD;;6HAE6H;AAC7H,SAAgB,GAAG,CAAC,CAAU,EAAE,GAAG,GAAc;IAC7C,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QACjE,OAAQ,GAAG,CAAC,CAAC,CAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KAC5C;SAAM;QACH,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KAC1B;AACL,CAAC;AAND,kBAMC;AACD;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,UAAmB,EAAE,QAAiB;IAC7D,IACI,OAAO,UAAU,KAAK,WAAW;QACjC,UAAU,KAAK,IAAI;QACnB,KAAK,CAAC,UAAoB,CAAC,EAC7B;QACE,OAAO,QAAQ,CAAC;KACnB;SAAM;QACH,OAAO,UAAU,CAAC;KACrB;AACL,CAAC;AAVD,gCAUC;AACD;;;;;;;GAOG;AACH,SAAgB,KAAK,CAAC,KAAa,EAAE,GAAY;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EACxD,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;IAE3D,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;AAC1F,CAAC;AALD,sBAKC;AACD;;;GAGG;AACH,SAAgB,GAAG,CAAC,GAAW,EAAE,GAAG,aAAoB;IACpD,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,aAAa,CAAC,CAAC;KACtC;AACL,CAAC;AAJD,kBAIC;AACD;;;GAGG;AACH,SAAgB,IAAI,CAAC,GAAW,EAAE,GAAG,aAAoB;IACrD,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,aAAa,CAAC,CAAC;KACvC;AACL,CAAC;AAJD,oBAIC;AACD;;;GAGG;AACH,SAAgB,KAAK,CAAC,GAAW,EAAE,GAAG,aAAoB;IACtD,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,aAAa,CAAC,CAAC;KACxC;AACL,CAAC;AAJD,sBAIC"}
@@ -2,9 +2,9 @@ import jDate from './jDate.js';
2
2
  /** *********************************************************************************************************
3
3
  * Computes the Day Yomi for the given day.
4
4
  * Sample of use - to get todays daf:
5
- * const dafEng = Dafyomi.toString(new jDate(new Date()));
6
- * const dafHeb = Dafyomi.toStringHeb(new jDate(new Date()));
7
- * The code was converted to javascript and tweaked by CBS.
5
+ * const dafEng = Dafyomi.toString(jDate.now());
6
+ * const dafHeb = Dafyomi.toStringHeb(jDate.now());
7
+ * The code was converted to typescript and tweaked by CBS.
8
8
  * It is directly based on the C code in Danny Sadinoff's HebCal - Copyright (C) 1994.
9
9
  * The HebCal code for dafyomi was adapted by Aaron Peromsik from Bob Newell's public domain daf.el.
10
10
  ***********************************************************************************************************/
@@ -25,3 +25,4 @@ export default class Dafyomi {
25
25
  static toString(jd: jDate): string | undefined;
26
26
  static toStringHeb(jd: jDate): string | undefined;
27
27
  }
28
+ //# sourceMappingURL=Dafyomi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dafyomi.d.ts","sourceRoot":"","sources":["../../src/JCal/Dafyomi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,YAAY,CAAC;AAG/B;;;;;;;;4GAQ4G;AAC5G,MAAM,CAAC,OAAO,OAAO,OAAO;IACxB,MAAM,CAAC,YAAY;;;;QAwCyB;IAE5C,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAI;QAAE,QAAQ,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IA+DzG,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS;IAQ9C,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS;CAMpD"}
@@ -9,9 +9,9 @@ const jDate_js_1 = __importDefault(require("./jDate.js"));
9
9
  /** *********************************************************************************************************
10
10
  * Computes the Day Yomi for the given day.
11
11
  * Sample of use - to get todays daf:
12
- * const dafEng = Dafyomi.toString(new jDate(new Date()));
13
- * const dafHeb = Dafyomi.toStringHeb(new jDate(new Date()));
14
- * The code was converted to javascript and tweaked by CBS.
12
+ * const dafEng = Dafyomi.toString(jDate.now());
13
+ * const dafHeb = Dafyomi.toStringHeb(jDate.now());
14
+ * The code was converted to typescript and tweaked by CBS.
15
15
  * It is directly based on the C code in Danny Sadinoff's HebCal - Copyright (C) 1994.
16
16
  * The HebCal code for dafyomi was adapted by Aaron Peromsik from Bob Newell's public domain daf.el.
17
17
  ***********************************************************************************************************/
@@ -129,3 +129,4 @@ Dafyomi.masechtaList = [
129
129
  { eng: 'Niddah', heb: 'נדה', daf: 73 }
130
130
  ];
131
131
  exports.default = Dafyomi;
132
+ //# sourceMappingURL=Dafyomi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dafyomi.js","sourceRoot":"","sources":["../../src/JCal/Dafyomi.ts"],"names":[],"mappings":";;;;;AAAA,0DAA+B;AAC/B,0DAA+B;AAE/B,YAAY,CAAC;AACb;;;;;;;;4GAQ4G;AAC5G,MAAqB,OAAO;IA2CxB,MAAM,CAAC,MAAM,CAAC,KAAY;QACtB,MAAM,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC;QAC/B,IAAI,MAAM,GAAG,EAAE,EAAE,GAAW,EAAE,GAAW,EAAE,KAAa,EAAE,KAAa,EAAE,KAAa,EAAE,KAAa,EAAE,CAAS,EAAE,KAAa,CAAC;QAEhI,KAAK,GAAG,kBAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC3C,KAAK,GAAG,kBAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAE3C,qCAAqC;QACrC,IAAI,YAAY,GAAG,KAAK;YACpB,OAAO,IAAI,CAAC,CAAC,iCAAiC;QAClD,IAAI,YAAY,IAAI,KAAK,EAAE;YACvB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AAE,EAAE;IACzC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE;IACzC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE;IAC1C,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE;IACxC,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE;IACtC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE;IACtC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE;IACrC,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;CAAC,CAAC;kBAzC3B,OAAO"}
@@ -4,26 +4,25 @@ UTCOffset is the time zone. Israel is always 2 and the US East coast is -5. Engl
4
4
  If UTCOffset is not specifically supplied, the longitude will be used to get a quasi-educated guess.*/
5
5
  export default class Location {
6
6
  Name: string;
7
+ NameHebrew?: string;
7
8
  Israel: boolean;
8
9
  Latitude: number;
9
10
  Longitude: number;
10
11
  UTCOffset: number;
11
12
  Elevation: number;
12
13
  CandleLighting?: number;
13
- locationId?: number;
14
14
  /**
15
15
  * Describe a new Location.
16
16
  * @param {String} name The name of the Location
17
+ * @param {String} nameHeb The name of the Location
17
18
  * @param {Boolean} israel Is this Location in Israel?
18
19
  * @param {Number} latitude
19
20
  * @param {Number} longitude
20
21
  * @param {Number} utcOffset The time zone. Israel is 2 and New York is -5.
21
22
  * @param {Number} elevation Elevation in meters
22
23
  * @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
23
- * @param {Number} [locationId] If this location is in a database, keeps track of the id
24
24
  */
25
- constructor(name: string, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number, locationId?: number);
26
- hasId(): boolean;
25
+ constructor(name: string, nameHeb: string | undefined, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
27
26
  static clone(location: Location): Location;
28
27
  static getCandles(location: Location): number;
29
28
  /**Gets the Location for Jerusalem.*/
@@ -31,3 +30,4 @@ export default class Location {
31
30
  /**Gets the Location for Lakewood NJ*/
32
31
  static getLakewood(): Location;
33
32
  }
33
+ //# sourceMappingURL=Location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Location.d.ts","sourceRoot":"","sources":["../../src/JCal/Location.ts"],"names":[],"mappings":"AAAA;;;sGAGsG;AACtG,MAAM,CAAC,OAAO,OAAO,QAAQ;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;OAUG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM;IA+B1K,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ;IAY/B,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAQ;IAoBpC,qCAAqC;IACrC,MAAM,CAAC,YAAY;IAGnB,sCAAsC;IACtC,MAAM,CAAC,WAAW;CAGrB"}
@@ -8,21 +8,21 @@ class Location {
8
8
  /**
9
9
  * Describe a new Location.
10
10
  * @param {String} name The name of the Location
11
+ * @param {String} nameHeb The name of the Location
11
12
  * @param {Boolean} israel Is this Location in Israel?
12
13
  * @param {Number} latitude
13
14
  * @param {Number} longitude
14
15
  * @param {Number} utcOffset The time zone. Israel is 2 and New York is -5.
15
16
  * @param {Number} elevation Elevation in meters
16
17
  * @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
17
- * @param {Number} [locationId] If this location is in a database, keeps track of the id
18
18
  */
19
- constructor(name, israel, latitude, longitude, utcOffset, elevation, candleLighting, locationId) {
19
+ constructor(name, nameHeb, israel, latitude, longitude, utcOffset, elevation, candleLighting) {
20
20
  //If the israel argument was not set at all.
21
21
  if (typeof israel === 'undefined' || israel === null) {
22
22
  //If the user is within Israels general coordinates,
23
23
  //we feel pretty safe assuming they are in Israel.
24
- //Where else on the map is the user? (Note, the probablity of our users Jewishness: 99.99%)
25
- //Sinai, Lebanon, Syria, Jordan, in a submarine under the Mediterannian ...
24
+ //Where else on the map is the user? (Note, the probability of our users Jewishness: 99.99%)
25
+ //Sinai, Lebanon, Syria, Jordan, in a submarine under the Mediterranean ...
26
26
  israel = (latitude > 29.45 && latitude < 33 && longitude < -34.23 && longitude > -35.9);
27
27
  }
28
28
  if (israel) {
@@ -33,23 +33,20 @@ class Location {
33
33
  else if (typeof utcOffset === 'undefined' || utcOffset === null) {
34
34
  //Try to determine the "correct" time zone using the simple fact that Greenwich is both TZ 0 and longitude 0.
35
35
  //Even though technically this is the way it should be,
36
- //it will be often incorrect as time zones are almost always tweaked to accomadate the closest border.
36
+ //it will be often incorrect as time zones are almost always tweaked to accommodate the closest border.
37
37
  utcOffset = -Math.round(longitude / 15);
38
38
  }
39
39
  this.Name = (name || 'Unknown Location');
40
+ this.NameHebrew = nameHeb;
40
41
  this.Israel = !!israel;
41
42
  this.Latitude = latitude;
42
43
  this.Longitude = longitude;
43
44
  this.UTCOffset = utcOffset || 0;
44
45
  this.Elevation = elevation || 0;
45
46
  this.CandleLighting = candleLighting || Location.getCandles(this);
46
- this.locationId = locationId;
47
- }
48
- hasId() {
49
- return !!this.locationId;
50
47
  }
51
48
  static clone(location) {
52
- return new Location(location.Name, location.Israel, location.Latitude, location.Longitude, location.UTCOffset, location.Elevation, location.CandleLighting || 0, location.locationId || 0);
49
+ return new Location(location.Name, location.NameHebrew, location.Israel, location.Latitude, location.Longitude, location.UTCOffset, location.Elevation, location.CandleLighting || 0);
53
50
  }
54
51
  static getCandles(location) {
55
52
  if (location.CandleLighting) {
@@ -70,11 +67,12 @@ class Location {
70
67
  }
71
68
  /**Gets the Location for Jerusalem.*/
72
69
  static getJerusalem() {
73
- return new Location('Jerusalem', true, 31.78, -35.22, 2, 800, 40, 28);
70
+ return new Location('Jerusalem', 'ירושלים', true, 31.78, -35.22, 2, 800, 40);
74
71
  }
75
72
  /**Gets the Location for Lakewood NJ*/
76
73
  static getLakewood() {
77
- return new Location('Lakewood NJ', false, 40.1, 74.23, -5, 0, 18, 185);
74
+ return new Location('Lakewood NJ', undefined, false, 40.1, 74.23, -5, 0, 18);
78
75
  }
79
76
  }
80
77
  exports.default = Location;
78
+ //# sourceMappingURL=Location.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Location.js","sourceRoot":"","sources":["../../src/JCal/Location.ts"],"names":[],"mappings":";;AAAA;;;sGAGsG;AACtG,MAAqB,QAAQ;IASzB;;;;;;;;;;OAUG;IACH,YAAY,IAAY,EAAE,OAA2B,EAAE,MAAe,EAAE,QAAgB,EAAE,SAAiB,EAAE,SAAiB,EAAE,SAAiB,EAAE,cAAuB;QACtK,4CAA4C;QAC5C,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,IAAI,EAAE;YAClD,oDAAoD;YACpD,kDAAkD;YAClD,4FAA4F;YAC5F,2EAA2E;YAC3E,MAAM,GAAG,CAAC,QAAQ,GAAG,KAAK,IAAI,QAAQ,GAAG,EAAE,IAAI,SAAS,GAAG,CAAC,KAAK,IAAI,SAAS,GAAG,CAAC,IAAI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