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

You may use the HTML tags below, courtesy of Kevin Ilsen’ JavaScript Event Calendar to put a calendar on your website. See an example of what the event calendar looks like.

If you just want holidays and no candle-lighting times, put these tags in the <head> section of the page:

<script type="text/javascript" charset="utf-8"
 src="http://www.hebcal.com/hebcal/?v=1&amp;cfg=e2&amp;nh=on&amp;nx=on&amp;year=now&amp;month=x&amp;ss=on&amp;mf=on">
</script>
<script type="text/javascript"
 src="http://www.hebcal.com/i/calendar-2.0-min.js">
</script>
<link type="text/css" rel="stylesheet"
href="http://www.hebcal.com/i/jec-grey-min.css">
<style type="text/css">
#myCalendarContainer table { width: 800px }
#myCalendarContainer table td.dayHasEvent { height: 80px }
#myCalendarContainer table td.dayBlank { height: 80px }
</style>

Then, somewhere in the <body> section of the page where you want the calendar to appear, use these tags:

<div id="myCalendarContainer"></div>
<script type="text/javascript">
var myCalendar = new JEC("myCalendarContainer",
   {tableClass: "greyCalendar", linkNewWindow: false});
myCalendar.defineEvents(HEBCAL.jec2events);
myCalendar.showCalendar();
</script>

To add candle-lighting times for your city or town, you can change lines 1 and 2 in the first code block above as follows to include a zip code.

Be sure to change 90210 to your shul’s zip code. For example,

<script type="text/javascript"
 src="http://www.hebcal.com/hebcal/?v=1&amp;cfg=e2&amp;nh=on&amp;nx=on&amp;year=now&amp;month=x&amp;ss=on&amp;mf=on&amp;c=on&amp;zip=90210&amp;m=72&amp;s=on">
</script>

Note the following customizable parameters and their meanings:

  • nh=on – major holidays
  • nx=on – Rosh Chodesh
  • mf=on – minor fasts
  • ss=on – special Shabbatot
  • s=on- Parashat ha-Shavuah on Saturday
    • i=off – Diaspora sedra scheme
    • i=on – Israel sedra scheme
  • c=on – candle lighting times
  • zip=90210 – use zip code 90210 for candle lighting times
  • m=72 – Havdalah 72 minutes after sundown. Set to m=0 (zero) to disable Havdalah times
  • D=on – Hebrew date for dates with some event
  • d=on – Hebrew date for entire date range
  • o=on – Days of the Omer

Note mutually exclusive language parameter:

  • lg=s – Sephardic transliterations
  • lg=sh – Sephardic translit. + Hebrew
  • lg=a – Ashkenazis transliterations
  • lg=ah – Ashkenazis translit. + Hebrew
  • lg=h – Hebrew only