0
Answered

Chanukah API schema changed?

Aron Adler 1 year ago updated by Michael J. Radwin 1 year ago 1

Hi, I have a website (maoztzur.com) that displays the time for candle lighting for Chanukah. 

I use this API request to get the number of candles and the time for candle lighting for a given location: https://www.hebcal.com/hebcal/?v=1&cfg=json&maj=on&min=off&mod=off&nx=off&year=now&month=x&ss=off&mf=off&c=on&geo=pos&m=0&s=off&latitude=51.6093316&longitude=-0.2951551&tzid=Europe/London

However it looks like this is now broken because of an API schema change.


It used to be that the time of candle lighting was included in the `title` field of each item in `items[]` in this format: "Chanukah: 8 Candle: 6:18pm". I had a regex to parse this: ^Chanukah: (\d) Candles?: (\d\d?:\d\dpm)$

However it seems that the format has changed. Now the `title` field only says "Chanukah: 8 Candles". However I can see there is a new `date` field on each `item` in the format of "2020-12-17T16:51:00-00:00".

Can I confirm that this `date` is indeed the candle lighting time for the specified timezone?

Thanks

Answer

Answer
Answered

Yes, confirmed. If the `date` field contains a `T` then it includes a time in the timezone specified by the candle-lighting setting.

Answer
Answered

Yes, confirmed. If the `date` field contains a `T` then it includes a time in the timezone specified by the candle-lighting setting.