Closed icarpis closed 5 years ago
I don't think you can call setCity on an HDate object.
According to the README, you should do:
var year = new Hebcal();
year.setCity('Jerusalem');
-- Sent from my mobile device
On Tue, Aug 28, 2018, 9:30 AM Itay Carpis notifications@github.com wrote:
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.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hebcal/hebcal-js/issues/50, or mute the thread https://github.com/notifications/unsubscribe-auth/ADmC1d3QbvqnkOyAg8wsUW72AMuAp3_Dks5uVXAVgaJpZM4WP-Q0 .
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.)
I'm trying to get the Jerusalem candle lighting time for the coming Shabat by the following code snippet:
For some reason I'm getting the same time no matter if I call to setCity or not.