Jewish holidays and Hebrew calendar as iCalendar RFC 2445
$ npm install @hebcal/icalendar
import {HebrewCalendar, Location} from '@hebcal/core';
import icalendar from '@hebcal/icalendar';
const options = {
year: 2020,
month: 2,
sedrot: true,
candlelighting: true,
location: Location.lookup('Hawaii'),
};
const events = HebrewCalendar.calendar(options);
console.log(icalendar.eventsToIcalendar(ev, options));
- icalendar
-
Main interface to hebcal/icalendar
-
getFormatter(tzid) ⇒
Intl.DateTimeFormat
-
getPseudoISO(tzid, date) ⇒
string
-
getTimezoneOffset(tzid, date) ⇒
number
-
pad2(number) ⇒
string
-
timeZoneOffsetStr(tzid, date) ⇒
string
-
Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
-
toISOString(d) ⇒
string
-
Returns just the date portion as YYYY-MM-DD
-
toISOStringWithTimezone(date, timeStr, tzid) ⇒
string
-
Returns a string like "2018-09-01T12:30:00-05:00'"
-
getEventCategories(ev) ⇒
Array.<string>
-
Returns a category and subcategory name
- icalWriteLine(res, ...str)
-
formatYYYYMMDD(d) ⇒
string
-
formatTime(hour, min, sec) ⇒
string
-
makeDtstamp(dt) ⇒
string
-
Returns UTC string for iCalendar
- icalWriteEvent(res, e, dtstamp, options)
- addOptional(arr, key, val)
-
eventToIcal(e, options) ⇒
string
- exportHttpHeader(res, mimeType, fileName)
- icalWriteContents(res, events, options)
-
getDownloadFilename(options) ⇒
string
-
eventToCsv(e, options) ⇒
string
-
Renders an Event as a string
- csvWriteContents(res, events, options)
-
eventToFullCalendar(ev, tzid) ⇒
Object
-
Converts a Hebcal event to a FullCalendar.io object
Main interface to hebcal/icalendar
Kind: global function
Param | Type |
---|---|
tzid | string |
Kind: global function
Param | Type |
---|---|
tzid | string |
date | Date |
Kind: global function
Param | Type |
---|---|
tzid | string |
date | Date |
Kind: global function
Param | Type |
---|---|
number | number |
Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
Kind: global function
Param | Type |
---|---|
tzid | string |
date | Date |
Returns just the date portion as YYYY-MM-DD
Kind: global function
Param | Type |
---|---|
d | Date |
Returns a string like "2018-09-01T12:30:00-05:00'"
Kind: global function
Param | Type | Description |
---|---|---|
date | Date |
|
timeStr | string |
must be formatted with only hours and minutes, like "17:12" |
tzid | string |
like "America/New_York" |
Returns a category and subcategory name
Kind: global function
Param | Type |
---|---|
ev | Event |
Kind: global function
Param | Type |
---|---|
res | stream.Writable |
...str | string |
Kind: global function
Param | Type |
---|---|
d | Date |
Kind: global function
Param | Type |
---|---|
hour |
number | string
|
min |
number | string
|
sec |
number | string
|
Returns UTC string for iCalendar
Kind: global function
Param | Type |
---|---|
dt | Date |
Kind: global function
Param | Type |
---|---|
res | stream.Writable |
e | Event |
dtstamp | string |
options | hebcal.HebcalOptions |
Kind: global function
Param | Type |
---|---|
arr | Array.<string> |
key | string |
val | string |
Kind: global function
Returns: string
- multi-line result, delimited by \r\n
Param | Type |
---|---|
e | Event |
options | hebcal.HebcalOptions |
Kind: global function
Param | Type |
---|---|
res | stream.Writable |
mimeType | string |
fileName | string |
Kind: global function
Param | Type |
---|---|
res | stream.Writable |
events | Array.<Event> |
options | hebcal.HebcalOptions |
Kind: global function
Param | Type |
---|---|
options | hebcal.HebcalOptions |
Renders an Event as a string
Kind: global function
Param | Type |
---|---|
e | Event |
options | hebcal.HebcalOptions |
Kind: global function
Param | Type |
---|---|
res | stream.Writable |
events | Array.<Event> |
options | hebcal.HebcalOptions |
Converts a Hebcal event to a FullCalendar.io object
Kind: global function
Param | Type | Description |
---|---|---|
ev | Event |
|
tzid | string |
timeZone identifier |