hebcal/hebcal-js

setCity() doesn't work

icarpis opened this issue · 4 comments

I'm trying to get the Jerusalem candle lighting time for the coming Shabat by the following code snippet:

var hebDate = new Hebcal.HDate();
hebDate.setCity('Jerusalem');
var d = hebDate.after(5).candleLighting();

For some reason I'm getting the same time no matter if I call to setCity or not.

Thank you @mjradwin, but I still get unreasonable times.

@Scimonster can you take a look?

It seems that the call to after() made it lose the location data. Fixed now.

(You can set the location directly on an HDate BTW.)