@hebcal/rest-api 3.19.4 → 4.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.
- package/README.md +1 -69
- package/dist/bundle.js +523 -111
- package/dist/bundle.min.js +3 -2
- package/dist/index.js +523 -109
- package/dist/index.mjs +523 -85
- package/package.json +7 -6
- package/rest-api.d.ts +3 -16
package/README.md
CHANGED
|
@@ -44,15 +44,9 @@ Converts to lowercase and replaces non-word characters with hyphen ('-')
|
|
|
44
44
|
<dd></dd>
|
|
45
45
|
<dt><a href="#pad4">pad4(number)</a> ⇒ <code>string</code></dt>
|
|
46
46
|
<dd></dd>
|
|
47
|
-
<dt><del><a href="#timeZoneOffsetStr">timeZoneOffsetStr(tzid, date)</a> ⇒ <code>string</code></del></dt>
|
|
48
|
-
<dd><p>Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")</p>
|
|
49
|
-
</dd>
|
|
50
47
|
<dt><a href="#toISOString">toISOString(d)</a> ⇒ <code>string</code></dt>
|
|
51
48
|
<dd><p>Returns just the date portion as YYYY-MM-DD</p>
|
|
52
49
|
</dd>
|
|
53
|
-
<dt><del><a href="#toISOStringWithTimezone">toISOStringWithTimezone(date, timeStr, tzid)</a> ⇒ <code>string</code></del></dt>
|
|
54
|
-
<dd><p>Returns a string like "2018-09-01T12:30:00-05:00"</p>
|
|
55
|
-
</dd>
|
|
56
50
|
<dt><a href="#getEventCategories">getEventCategories(ev)</a> ⇒ <code>Array.<string></code></dt>
|
|
57
51
|
<dd><p>Returns a category and subcategory name</p>
|
|
58
52
|
</dd>
|
|
@@ -86,14 +80,10 @@ Converts to lowercase and replaces non-word characters with hyphen ('-')
|
|
|
86
80
|
<dd></dd>
|
|
87
81
|
<dt><a href="#formatLeyningResult">formatLeyningResult(reading)</a> ⇒ <code>Object</code></dt>
|
|
88
82
|
<dd></dd>
|
|
89
|
-
<dt><a href="#eventsToRss">eventsToRss(events, location, mainUrl, selfUrl, [lang], [evPubDate])</a> ⇒ <code>string</code></dt>
|
|
90
|
-
<dd></dd>
|
|
91
83
|
<dt><a href="#eventsToRss2">eventsToRss2(events, options)</a> ⇒ <code>string</code></dt>
|
|
92
84
|
<dd></dd>
|
|
93
85
|
<dt><a href="#eventToRssItem2">eventToRssItem2(ev, options)</a> ⇒ <code>string</code></dt>
|
|
94
86
|
<dd></dd>
|
|
95
|
-
<dt><a href="#eventToRssItem">eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, [options])</a> ⇒ <code>string</code></dt>
|
|
96
|
-
<dd></dd>
|
|
97
87
|
<dt><a href="#eventToFullCalendar">eventToFullCalendar(ev, tzid, il)</a> ⇒ <code>Object</code></dt>
|
|
98
88
|
<dd><p>Converts a Hebcal event to a FullCalendar.io object</p>
|
|
99
89
|
</dd>
|
|
@@ -151,20 +141,6 @@ makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
|
|
|
151
141
|
| --- | --- |
|
|
152
142
|
| number | <code>number</code> |
|
|
153
143
|
|
|
154
|
-
<a name="timeZoneOffsetStr"></a>
|
|
155
|
-
|
|
156
|
-
## ~~timeZoneOffsetStr(tzid, date) ⇒ <code>string</code>~~
|
|
157
|
-
***Deprecated***
|
|
158
|
-
|
|
159
|
-
Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
|
|
160
|
-
|
|
161
|
-
**Kind**: global function
|
|
162
|
-
|
|
163
|
-
| Param | Type |
|
|
164
|
-
| --- | --- |
|
|
165
|
-
| tzid | <code>string</code> |
|
|
166
|
-
| date | <code>Date</code> |
|
|
167
|
-
|
|
168
144
|
<a name="toISOString"></a>
|
|
169
145
|
|
|
170
146
|
## toISOString(d) ⇒ <code>string</code>
|
|
@@ -176,21 +152,6 @@ Returns just the date portion as YYYY-MM-DD
|
|
|
176
152
|
| --- | --- |
|
|
177
153
|
| d | <code>Date</code> |
|
|
178
154
|
|
|
179
|
-
<a name="toISOStringWithTimezone"></a>
|
|
180
|
-
|
|
181
|
-
## ~~toISOStringWithTimezone(date, timeStr, tzid) ⇒ <code>string</code>~~
|
|
182
|
-
***Deprecated***
|
|
183
|
-
|
|
184
|
-
Returns a string like "2018-09-01T12:30:00-05:00"
|
|
185
|
-
|
|
186
|
-
**Kind**: global function
|
|
187
|
-
|
|
188
|
-
| Param | Type | Description |
|
|
189
|
-
| --- | --- | --- |
|
|
190
|
-
| date | <code>Date</code> | |
|
|
191
|
-
| timeStr | <code>string</code> | must be formatted with only hours and minutes, like "17:12" |
|
|
192
|
-
| tzid | <code>string</code> | like "America/New_York" |
|
|
193
|
-
|
|
194
155
|
<a name="getEventCategories"></a>
|
|
195
156
|
|
|
196
157
|
## getEventCategories(ev) ⇒ <code>Array.<string></code>
|
|
@@ -329,21 +290,7 @@ Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
|
329
290
|
|
|
330
291
|
| Param | Type |
|
|
331
292
|
| --- | --- |
|
|
332
|
-
| reading | <code>
|
|
333
|
-
|
|
334
|
-
<a name="eventsToRss"></a>
|
|
335
|
-
|
|
336
|
-
## eventsToRss(events, location, mainUrl, selfUrl, [lang], [evPubDate]) ⇒ <code>string</code>
|
|
337
|
-
**Kind**: global function
|
|
338
|
-
|
|
339
|
-
| Param | Type | Default | Description |
|
|
340
|
-
| --- | --- | --- | --- |
|
|
341
|
-
| events | <code>Array.<Event></code> | | |
|
|
342
|
-
| location | <code>Location</code> | | |
|
|
343
|
-
| mainUrl | <code>string</code> | | |
|
|
344
|
-
| selfUrl | <code>string</code> | | |
|
|
345
|
-
| [lang] | <code>string</code> | <code>"en-US"</code> | language such as 'he' (default 'en-US') |
|
|
346
|
-
| [evPubDate] | <code>boolean</code> | <code>true</code> | if true, use event time as pubDate (false uses lastBuildDate) |
|
|
293
|
+
| reading | <code>Leyning</code> |
|
|
347
294
|
|
|
348
295
|
<a name="eventsToRss2"></a>
|
|
349
296
|
|
|
@@ -365,21 +312,6 @@ Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
|
365
312
|
| ev | <code>Event</code> |
|
|
366
313
|
| options | <code>CalOptions</code> |
|
|
367
314
|
|
|
368
|
-
<a name="eventToRssItem"></a>
|
|
369
|
-
|
|
370
|
-
## eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, [options]) ⇒ <code>string</code>
|
|
371
|
-
**Kind**: global function
|
|
372
|
-
|
|
373
|
-
| Param | Type |
|
|
374
|
-
| --- | --- |
|
|
375
|
-
| ev | <code>Event</code> |
|
|
376
|
-
| evPubDate | <code>boolean</code> |
|
|
377
|
-
| lastBuildDate | <code>string</code> |
|
|
378
|
-
| dayFormat | <code>Intl.DateTimeFormat</code> |
|
|
379
|
-
| location | <code>Location</code> |
|
|
380
|
-
| mainUrl | <code>string</code> |
|
|
381
|
-
| [options] | <code>CalOptions</code> |
|
|
382
|
-
|
|
383
315
|
<a name="eventToFullCalendar"></a>
|
|
384
316
|
|
|
385
317
|
## eventToFullCalendar(ev, tzid, il) ⇒ <code>Object</code>
|