Open ghost opened 5 years ago
You are indeed correct that it should be based on the user's location, but you can use the function at https://github.com/KosherJava/zmanim/blob/master/src/net/sourceforge/zmanim/ZmanimCalendar.java#L672 to get what you are looking for
@plonibarploni The current design of the library has no concept of time. Adding it would seriously complicate things. As @zachweix pointed out, there is support for what you are looking for in the Zmanim portion of the API that is very time aware. While I will leave this open, I do not see a resolution to this item in the near future.
@KosherJava While JewishDate states very prominently that it has no concept of time, JewishCalendar does not. Regardless, it seems to be very misleading to include this function isAssurBemelacha()
in a class that has no concept of time, being as it very specifically requires time to be taken into consideration. At the very least, a note should be added to the Javadoc of the function to state that it doesn't factor in the time.
I created a JewishDate()
constructor that takes sunset into account, and the dev replied with some ideas of how to properly implement it.
See #193
Being a Jewish calendar I would expect it to begin at nightfall. However, from looking at the code it seems that it always uses the regular Calendar date, which begins at midnight. This can result in incorrect results.
Consider the following:
This would consider even after nightfall on Saturday as if it is Shabbat (and therefore
isAssurBemelacha()
would evaluate totrue
), while it should not consider it to be Shabbat (andisAssurBemelacha()
should evaluate tofalse
).