Posted by & filed under Developers, APIs, RSS Feeds, Source Code.

To display a Jewish calendar on your website, you can use event data from Hebcal.com and the open source JavaScript event calendar from fullcalendar.io.

First, you’ll want to start by including the CSS and JS in your header, per the FullCalendar Basic Usage.

Then, for the events configuration, use a url that references our Jewish calendar REST API, but change cfg=json to cfg=fc.

You won’t need to specify a year=YYYY parameter, as the fullcalendar.io script automatically sends start=YYYY-MM-DD and end=YYYY-MM-DD parameters for you.

For best performance, be sure to use cache: true.

Here’s the FullCalendar invocation:

If you’d like to include candle-lighting times for Shabbat and holidays, be sure to adjust the url parameter to include c=on and one of the location fields (such as geonameid=3448439 for São Paulo, Brazil).

We recommend some specific styles to make the page look prettier:

Here’s a complete example that uses the aforementioned JS + CSS, and also includes the necessary stuff to load FullCalendar.io and dependencies via CDN: