0
Fixed

Havdalah times missing when holiday is on Motzei Shabbat

Uziel 5 years ago updated by Michael J. Radwin 10 months ago 6

Hi!

I'm having a bug, since my application is using your rest API for getting shabbat times, and its looking for two categories: "candles", "havdala".

But this week, since 1st candle of Hanuka is occuring in Motzei Shabat, there category "havdala" is missing, causing an exception in my application.

Answer

Answer
Fixed

Hi, thanks for the feedback.

We've made changes to how our API works and Chanukah candle-lighting times will no longer suppress regular Shabbat/Havdalah times. Here's an example to illustrate how the API now behaves (with 2 events on Friday night and 2 events on Saturday night).

https://www.hebcal.com/hebcal?v=1&cfg=json&c=on&maj=on&min=on&zip=02906&year=2016&month=12&leyning=off


{

"title": "Chanukah: 7 Candles",

"date": "2016-12-30T16:05:00-05:00",

"category": "holiday",

"subcat": "major",

"hebrew": "חנוכה: ז׳ נרות",

"link": "https://www.hebcal.com/holidays/chanukah-2016?utm_source=js&utm_medium=api",

"memo": "Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights"

},

{

"title": "Candle lighting: 4:05pm",

"date": "2016-12-30T16:05:00-05:00",

"category": "candles",

"title_orig": "Candle lighting",

"hebrew": "הדלקת נרות"

},

{

"title": "Chanukah: 8 Candles",

"date": "2016-12-31T17:11:00-05:00",

"category": "holiday",

"subcat": "major",

"hebrew": "חנוכה: ח׳ נרות",

"link": "https://www.hebcal.com/holidays/chanukah-2016?utm_source=js&utm_medium=api",

"memo": "Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights"

},

{

"title": "Havdalah: 5:11pm",

"date": "2016-12-31T17:11:00-05:00",

"category": "havdalah",

"title_orig": "Havdalah",

"hebrew": "הבדלה"

}

Answer
Fixed

Hi, thanks for the feedback.

We've made changes to how our API works and Chanukah candle-lighting times will no longer suppress regular Shabbat/Havdalah times. Here's an example to illustrate how the API now behaves (with 2 events on Friday night and 2 events on Saturday night).

https://www.hebcal.com/hebcal?v=1&cfg=json&c=on&maj=on&min=on&zip=02906&year=2016&month=12&leyning=off


{

"title": "Chanukah: 7 Candles",

"date": "2016-12-30T16:05:00-05:00",

"category": "holiday",

"subcat": "major",

"hebrew": "חנוכה: ז׳ נרות",

"link": "https://www.hebcal.com/holidays/chanukah-2016?utm_source=js&utm_medium=api",

"memo": "Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights"

},

{

"title": "Candle lighting: 4:05pm",

"date": "2016-12-30T16:05:00-05:00",

"category": "candles",

"title_orig": "Candle lighting",

"hebrew": "הדלקת נרות"

},

{

"title": "Chanukah: 8 Candles",

"date": "2016-12-31T17:11:00-05:00",

"category": "holiday",

"subcat": "major",

"hebrew": "חנוכה: ח׳ נרות",

"link": "https://www.hebcal.com/holidays/chanukah-2016?utm_source=js&utm_medium=api",

"memo": "Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights"

},

{

"title": "Havdalah: 5:11pm",

"date": "2016-12-31T17:11:00-05:00",

"category": "havdalah",

"title_orig": "Havdalah",

"hebrew": "הבדלה"

}

Agree -- this **IS** a bug. 


Aside from that, if the API is called with maj=off, then it shows both Havdalah and Candles on Saturday night!! That's proof that the behavior with maj=on **IS A BUG** and should be fixed. Read Johnny Graham's logic and tell me that makes sense by design!? 


Trouble is, it foolishly uses the same category for Shabbos and Chanukah candles with maj=off, so you can't programmatically distinguish one from the other from the API return values.


A second bug, IMO.

Michael,

The only way to identify Motzaei Shabbat/Yomtov in the current setup is to look for category="havdalah" or category="holiday" AND title startsWith "Chanukah" and the day is Shabbat (based on the datetime). For every other Shabbat and Yomtov throughout the year category="havdalah" is sufficient.


-1

If you see a candle lighting time event on a Saturday night you can assume that it signifies both Havdalah and candle lighting for the holiday.

That should be right for candle lightning of YomTov, but Chanuka candle lightning occurs along with the havdalah.

Anyway, is there a simple way to extract Motzei Shabbat time from the REST API for any generic case?

-1
Not a bug

Hebcal is working as designed. If a holiday begins on motzei Shabbat, there will be a Candle lighting event, not a Havdalah event. Your application will need to E modified to handle this case.