0
Answered

Jewish calendar REST API return zmanim for people that are located in Israel and keep 2 days yom tov

F. G. 5 months ago updated by Michael J. Radwin 5 months ago 1

I'm using the Hebcal Jewish calendar REST API for an app that shows weekly zmanim (candle lighitng and havdalah times).

We have people that live in Israel and keep 2 days yomtov. Is there a way to call the API for a location in Israel and get back the holidays in 2 days?

For example, if I call the following:

https://www.hebcal.com/hebcal?v=1&cfg=json&maj=on&start=2024-06-09&end=2024-06-17&c=on&geo=city&city=IL-Jerusalem&M=on&s=on&leyning=off

Can I see 2 days shevuos (June 12 & June13) like I see when calling this api for a location outside of Israel?

Answer

Answer
Answered

Hi, thank you for using the Hebcal APIs.

You are correct that if you specify a location in Israel such as Jerusalem, the API automatically assumes only one day of yom tov. There is no way to disable the Israel holiday schedule if you specify a city for candle-lighting and fast times.

You can work around this by making two separate calls to the API, and then merge the results together in your application. 


The first would be for Diaspora holidays and Torah readings only, like the following:


https://www.hebcal.com/hebcal?v=1&cfg=json&maj=on&start=2024-06-09&end=2024-06-17&c=off&i=off&M=on&s=on&leyning=off

The second could be for Jerusalem candle-lighting times only, with no holidays or Torah reading:

https://www.hebcal.com/hebcal?v=1&cfg=json&maj=off&start=2024-06-09&end=2024-06-17&c=on&geo=city&city=IL-Jerusalem&M=on&s=off

Note carefully the URL differences. The first URL uses c=off s=on maj=on. The second URL uses c=on s=off maj=off

We hope this helps!

Answer
Answered

Hi, thank you for using the Hebcal APIs.

You are correct that if you specify a location in Israel such as Jerusalem, the API automatically assumes only one day of yom tov. There is no way to disable the Israel holiday schedule if you specify a city for candle-lighting and fast times.

You can work around this by making two separate calls to the API, and then merge the results together in your application. 


The first would be for Diaspora holidays and Torah readings only, like the following:


https://www.hebcal.com/hebcal?v=1&cfg=json&maj=on&start=2024-06-09&end=2024-06-17&c=off&i=off&M=on&s=on&leyning=off

The second could be for Jerusalem candle-lighting times only, with no holidays or Torah reading:

https://www.hebcal.com/hebcal?v=1&cfg=json&maj=off&start=2024-06-09&end=2024-06-17&c=on&geo=city&city=IL-Jerusalem&M=on&s=off

Note carefully the URL differences. The first URL uses c=off s=on maj=on. The second URL uses c=on s=off maj=off

We hope this helps!