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

Much like our full Jewish calendar REST API, we offer a simple API for getting just this week’s Shabbat times and Torah Portion. Two output formats are supported: JSON and RSS.

The basic URL format is as follows:

http://www.hebcal.com/shabbat/?cfg=json&geonameid=3448439&m=50

Note the following customizable parameters and their meanings:

  • cfg=json – output format is JSON (cfg=json) or RSS (cfg=r)
  • m=50 – Havdalah 50 minutes after sundown. Set to m=0 (zero) to disable Havdalah times
  • b=18 – Candle-lighting time minutes before sunset
  • a=off – use Sephardic (a=off) or Ashkenazis transliterations (a=on)

You must specify a location for candle-lighting times:

  • geo=geoname – location specified by GeoNames.org numeric ID
    • requires additional parameter geonameid=3448439
    • Hebcal.com supports approximately 47,000 different GeoNames IDs. These are cities with a population of 5000+. See cities5000.zip from http://download.geonames.org/export/dump/.
  • geo=zip – location specified by United States ZIP code
    • requires additional parameter zip=90210
  • geo=city – location specified by one of the Hebcal.com legacy city identifiers
    • requires additional parameter city=GB-London
  • geo=pos – location specified by latitude, longitude, and timezone. Requires additional 3 parameters:
    • latitude=[-90 to 90] – latitude in decimal format (e.g. 31.76904 or -23.5475)
    • longitude=[-180 to 180] – longitude decimal format (e.g. 35.21633 or -46.63611)
    • tzid=TimezoneIdentifier (See List of tz database time zones)

And example output looks like this:

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

Hebcal.com offers a REST API for fetching Jewish calendar data. The output format is in JSON.

The basic URL format is as follows:

http://www.hebcal.com/hebcal/?v=1&cfg=json&maj=on&min=on&mod=on&nx=on&year=now&month=x&ss=on&mf=on&c=on&geo=geoname&geonameid=3448439&m=50&s=on

Note the following customizable parameters and their meanings:

  • v=1 – version. Required.
  • cfg=json – output JSON instead of HTML. Also variant cfg=fc for fullcalendar.io integration
  • year=now – “now” for current year, or 4-digit YYYY such as 2003
  • month=x – “x” for entire Gregorian year, or use a numeric month (1=January, 6=June, etc.)
  • maj=on – Major holidays
  • min=on – Minor holidays (Tu BiShvat, Lag B’Omer, …)
  • nx=on – Rosh Chodesh
  • mf=on – Minor fasts (Ta’anit Esther, Tzom Gedaliah, …)
  • ss=on – Special Shabbatot (Shabbat Shekalim, Zachor, …)
  • mod=on – Modern holidays (Yom HaShoah, Yom HaAtzma’ut, …)
  • s=on – Parashat ha-Shavuah on Saturday
  • c=on – Candle lighting times. See also candle-lighting options below.
    • m=50 – Havdalah 50 minutes after sundown. Set to m=0 (zero) to disable Havdalah times
    • b=18 – Candle-lighting time minutes before sunset
  • D=on – Hebrew date for dates with some event
  • d=on – Hebrew date for entire date range
  • o=on – Days of the Omer

Mutually exclusive options for Diaspora/Israel holidays and Torah Readings:

  • i=off – Diaspora holidays and Torah readings (default if unspecified)
  • i=on – Israel holidays and Torah readings

Mutually exclusive location for candle-lighting times:

  • geo=none – no candle-lighting location (default if unspecified)
  • geo=geoname – location specified by GeoNames.org numeric ID
    • requires additional parameter geonameid=3448439
    • Hebcal.com supports approximately 47,000 different GeoNames IDs. These are cities with a population of 5000+. See cities5000.zip from http://download.geonames.org/export/dump/.
  • geo=zip – location specified by United States ZIP code
    • requires additional parameter zip=90210
  • geo=city – location specified by one of the Hebcal.com legacy city identifiers
    • requires additional parameter city=GB-London
  • geo=pos – location specified by latitude, longitude, and timezone. Requires additional 3 parameters:
    • latitude=[-90 to 90] – latitude in decimal format (e.g. 31.76904 or -23.5475)
    • longitude=[-180 to 180] – longitude decimal format (e.g. 35.21633 or -46.63611)
    • tzid=TimezoneIdentifier (See List of tz database time zones)

Mutually exclusive language parameter:

  • lg=s – Sephardic transliterations (default if unspecified)
  • lg=sh – Sephardic translit. + Hebrew
  • lg=a – Ashkenazis transliterations
  • lg=ah – Ashkenazis translit. + Hebrew
  • lg=h – Hebrew only

Optional callback parameter:

  • callback=function – wraps the JSON output text in parentheses and a function name of your choosing. Callback function names may only use upper and lowercase alphabetic characters (A-Z, a-z), numbers (0-9), the period (.), the underscore (_).

And example output looks like this:

If you don’t want candle lighting times, just use c=off and omit the zip and m parameters.

Posted by & filed under News.

At the request of several users, we’ve added support for Tu B’Av and Sigd.

Tu B’Av is a minor Jewish holiday of love, similar to Valentine’s Day. It occurs on the 15th of Hebrew month of Av, corresponding to July or August on the Gregorian calendar. This year, Tu B’Av begins on Thursday, 30 July 2015 at sundown.

Sigd is a modern holiday celebrated by the Ethiopian Jewish community on the 29th of the Hebrew month of Cheshvan, corresponding to late October or November on the Gregorian calendar. Sigd became a national holiday in Israel in 2008. This year, Sigd begins on Tuesday, 10 November 2015 at sundown.

 

Posted by & filed under General.

Hebcal.com was primarily authored using hand-coded HTML5, PHP and Perl in Sublime Text 3 and Aquamacs.

Our minimalist, responsive design is provided by the Bootstrap framework.

The website runs on Apache HTTP Server on Ubuntu Linux. We use the Varnish HTTP accelerator and Pound for HTTPS (TSL/SSL) termination. We primarily use DigitalOcean and Netkine for hosting, with occasional use of Amazon Web Services (primarily SES for weekly emails and S3 for backups). Static pages are generated with GNU make and scheduled by Vixie Cron.

Our Help pages and news archives are powered by WordPress.

We use MySQL to store our email subscriber database, and SQLite for latitude/longitude location databases (GeoNames and USA ZIP codes).

Typefaces

Hebcal.com primarily uses Helvetica Neue for body and headers. Helvetica Neue is the default font for Bootstrap

Hebrew body and headline text is Alef Hebrew.

The Hebcal logo uses SBL Hebrew and Merriweather.