Closed emor closed 10 years ago
Thanks for the report. What version of HebcalJS are you using, and what timezone are you in? It's quite likely that it's returning the correct Date object, it might just not display properly for your location.
~Sci
On Tue, Jun 17, 2014 at 6:50 AM, Edo Mor notifications@github.com wrote:
I am using New York as the city. Shabbat candelighting should be on a friday rather than thursday. Here is a sample shabbat, this may be affecting other holidays and calculations as well:
var hebcal = new Hebcal(); var holidays = hebcal.holidays; var holiday1 = holidays[19]; <--- returns erev shabbat var whencandle = holiday1.candleLighting(); <--- returns a thursday date
hope this makes sense, hope its a good find. Thanks!
— Reply to this email directly or view it on GitHub https://github.com/hebcal/hebcal-js/issues/13.
using version 2.1.1. I'm in New York which is eastern time zone. HebcalJS is detecting my location using geolocation in the browser and that seems to be working fine as it's showing New York for the nearest city.
Can you post the output of console.log
ging holiday1
and whencandle
?
var holiday1 = holidays[19]; ---> undefined
holiday1 ---> o {date: n, desc: Array[3], IGNORE_YEAR: false, USER_EVENT: false, LIGHT_CANDLES: true…}
var whencandle = holiday1.candleLighting(); ---> undefined
whencandle ---> Thu Apr 10 2014 19:12:51 GMT-0400 (EDT)
This seems to be a bug, as i am able to reproduce the issue. Thanks for the report. I'll try and fix it for the next version.
Great. Thanks. I have a hunch that this bug may be much broader as it may be caused by mismatching gregorian dates to hebrew dates, where for every gregorian date, there are actually 2 hebrew dates and visa versa. Thanks again.
I'm thinking something along those lines too.
On 6/18/14, Edo Mor notifications@github.com wrote:
Great. Thanks. I have a hunch that this bug may be much broader as it may be caused by mismatching gregorian dates to hebrew dates, where for every gregorian date, there are actually 2 hebrew dates and visa versa. Thanks again.
Reply to this email directly or view it on GitHub: https://github.com/hebcal/hebcal-js/issues/13#issuecomment-46398759
~Sci
Nope, the bug was that HDate().sunset()
returns the previous night. This is intentional; i was merely misusing it.
This is fixed in the latest development version, hebcal/hebcal-js@6565a20
Be aware that new Hebcal().holidays
is not an array anymore. You should always use new Hebcal.HDate().holidays()
. I also added the method new Hebcal.HDate().candleLighting()
.
The new release has now gone public. This fixes this bug.
this same bug seems to now be affecting havdalah, which is showing the same day as candleLighting except one hour later. ex. candlelighting is 8:02pm on friday and havdalah is 9:02pm on friday, surely shabbat lasts more than an hour.
Thanks!!
Whoops. Will be fixed in 2.0.1, to be released soon.
~Sci
On Mon, Jul 21, 2014 at 10:05 PM, Edo Mor notifications@github.com wrote:
this same bug seems to now be affecting havdalah, which is showing the same day as candleLighting except one hour later. ex. candlelighting is 8:02pm on friday and havdalah is 9:02pm on friday, surely shabbat lasts more than an hour.
Thanks!!
— Reply to this email directly or view it on GitHub https://github.com/hebcal/hebcal-js/issues/13#issuecomment-49650361.
I am using New York as the city. Shabbat candelighting should be on a friday rather than thursday. Here is a sample shabbat, this may be affecting other holidays and calculations as well:
var hebcal = new Hebcal(); var holidays = hebcal.holidays; var holiday1 = holidays[19]; <--- returns erev shabbat var whencandle = holiday1.candleLighting(); <--- returns a thursday date
hope this makes sense, hope its a good find. Thanks!