setCity() doesn't work
icarpis opened this issue · 4 comments
icarpis commented
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.
mjradwin commented
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 ***@***.***> 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
<#50>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADmC1d3QbvqnkOyAg8wsUW72AMuAp3_Dks5uVXAVgaJpZM4WP-Q0>
.
mjradwin commented
@Scimonster can you take a look?
Scimonster commented
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.)