npm.io
7.1.3 • Published 3 weeks ago

@hebcal/rest-api

Licence
BSD-2-Clause
Version
7.1.3
Deps
3
Size
144 kB
Vulns
0
Weekly
0
Stars
19

@hebcal/rest-api

Jewish holidays and Hebrew calendar as plain JSON objects and CSV export

Build Status

Installation

$ npm install @hebcal/rest-api

Synopsis

import {HebrewCalendar, Location} from '@hebcal/core';
import {eventsToClassicApi, eventsToCsv} from '@hebcal/rest-api';

const options = {
  year: 2020,
  month: 2,
  sedrot: true,
  candlelighting: true,
  location: Location.lookup('Hawaii'),
};
const events = HebrewCalendar.calendar(options);
const apiResult = eventsToClassicApi(events, options);

console.log(JSON.stringify(apiResult));

const csv = eventsToCsv(events, options);
console.log(JSON.stringify(csv));

API Documentation

Keywords