0
Not a bug

Havdalah times missing when holiday is on Motzei Shabbat

Uziel 1 year ago • updated by glenm201 2 months ago 5

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

-1
Answer

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.

-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.

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
Answer

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.

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.


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.