Have ideas to improve npm?Join in the discussion! »

@hebcal/icalendarTypeScript icon, indicating that this package has built-in type declarations

4.4.0 • Public • Published

hebcal-icalendar

Jewish holidays and Hebrew calendar as iCalendar RFC 2445

Installation

$ npm install @hebcal/icalendar

Synopsis

import {HebrewCalendar, Location} from '@hebcal/core';
import {eventsToIcalendar} from '@hebcal/icalendar';

const options = {
  year: 2020,
  month: 2,
  sedrot: true,
  candlelighting: true,
  location: Location.lookup('Hawaii'),
};
const events = HebrewCalendar.calendar(options);
console.log(await eventsToIcalendar(ev, options));

Functions

eventToIcal(e, options)string

Transforms a single Event into a VEVENT string

eventsToIcalendarStream(readable, events, options)stream.Readable

Generates an RFC 2445 iCalendar stream from an array of events

eventsToIcalendar(events, options)string

Renders an array of events as a full RFC 2445 iCalendar string

eventToIcal(e, options) ⇒ string

Transforms a single Event into a VEVENT string

Kind: global function
Returns: string - multi-line result, delimited by \r\n

Param Type
e Event
options HebcalOptions

eventsToIcalendarStream(readable, events, options) ⇒ stream.Readable

Generates an RFC 2445 iCalendar stream from an array of events

Kind: global function

Param Type
readable stream.Readable
events Array.<Event>
options HebcalOptions

eventsToIcalendar(events, options) ⇒ string

Renders an array of events as a full RFC 2445 iCalendar string

Kind: global function
Returns: string - multi-line result, delimited by \r\n

Param Type
events Array.<Event>
options HebcalOptions

Install

npm i @hebcal/icalendar

DownloadsWeekly Downloads

40

Version

4.4.0

License

BSD-2-Clause

Unpacked Size

57.1 kB

Total Files

6

Last publish

Collaborators

  • avatar