Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@hebcal/rest-api
Advanced tools
Jewish holidays and Hebrew calendar as plain JSON objects and CSV export
Jewish holidays and Hebrew calendar as plain JSON objects, RSS, and CSV export
$ npm install @hebcal/rest-api
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));
string
string
Helper function to transform a string to make it more usable in a URL or filename. Converts to lowercase and replaces non-word characters with hyphen ('-').
string
string
string
string
Returns just the date portion as YYYY-MM-DD
Array.<string>
Returns a category and subcategory name
string
Renders the event title in default locale, but strips off time
string
Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
string
Returns an English language description of the holiday
string
Makes mulit-line text that summarizes Torah & Haftarah
string
Appends utm_source and utm_medium parameters to a URL
string
Renders an Event as a string
string
Object
Formats a list events for the classic Hebcal.com JSON API response
Object
Converts a Hebcal event to a classic Hebcal.com JSON API object
Object
Object
string
string
Object
Converts a Hebcal event to a FullCalendar.io object
string
Kind: global function
Param | Type |
---|---|
location | Location |
string
Helper function to transform a string to make it more usable in a URL or filename. Converts to lowercase and replaces non-word characters with hyphen ('-').
Kind: global function
Param | Type |
---|---|
s | string |
Example
makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
string
Kind: global function
Param | Type |
---|---|
options | CalOptions |
string
Kind: global function
Param | Type |
---|---|
number | number |
string
Kind: global function
Param | Type |
---|---|
number | number |
string
Returns just the date portion as YYYY-MM-DD
Kind: global function
Param | Type |
---|---|
d | Date |
Array.<string>
Returns a category and subcategory name
Kind: global function
Param | Type |
---|---|
ev | Event |
string
Renders the event title in default locale, but strips off time
Kind: global function
Param | Type |
---|---|
ev | Event |
string
Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
Kind: global function
Param | Type |
---|---|
events | Array.<Event> |
options | CalOptions |
string
Returns an English language description of the holiday
Kind: global function
Param | Type | Default |
---|---|---|
ev | Event | |
[firstSentence] | boolean | false |
string
Makes mulit-line text that summarizes Torah & Haftarah
Kind: global function
Param | Type |
---|---|
ev | Event |
il | boolean |
string
Appends utm_source and utm_medium parameters to a URL
Kind: global function
Param | Type |
---|---|
url | string |
il | boolean |
utmSource | string |
utmMedium | string |
utmCampaign | string |
string
Renders an Event as a string
Kind: global function
Param | Type |
---|---|
e | Event |
options | CalOptions |
string
Kind: global function
Param | Type |
---|---|
events | Array.<Event> |
options | HebcalOptions |
Object
Formats a list events for the classic Hebcal.com JSON API response
Kind: global function
Param | Type | Default |
---|---|---|
events | Array.<Event> | |
options | CalOptions | |
[leyning] | boolean | true |
Object
Converts a Hebcal event to a classic Hebcal.com JSON API object
Kind: global function
Param | Type | Default |
---|---|---|
ev | Event | |
options | CalOptions | |
[leyning] | boolean | true |
Object
Kind: global function
Param | Type |
---|---|
result | Object |
aliyot | Object |
Object
Kind: global function
Param | Type |
---|---|
reading | Leyning |
string
Kind: global function
Param | Type |
---|---|
events | Array.<Event> |
options | CalOptions |
string
Kind: global function
Param | Type |
---|---|
ev | Event |
options | CalOptions |
Object
Converts a Hebcal event to a FullCalendar.io object
Kind: global function
Param | Type | Description |
---|---|---|
ev | Event | |
tzid | string | timeZone identifier |
il | boolean | true if Israel |
FAQs
Jewish holidays and Hebrew calendar as plain JSON objects and CSV export
The npm package @hebcal/rest-api receives a total of 46 weekly downloads. As such, @hebcal/rest-api popularity was classified as not popular.
We found that @hebcal/rest-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.