Skip to content

Begin JewishCalendar day At Sunset or Nightfall #139

Open

Description

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:

JewishCalendar jcal = new JewishCalendar();
if (jcal.isAssurBemelacha())
    System.out.print("Please don't use on Shabbat or Jewish Holidays");

This would consider even after nightfall on Saturday as if it is Shabbat (and therefore isAssurBemelacha() would evaluate to true), while it should not consider it to be Shabbat (and isAssurBemelacha() should evaluate to false).

Activity

  1. zachweix commented on Aug 22, 2019

    @zachweix
    Contributor

    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

  2. KosherJava commented on Aug 22, 2019

    @KosherJava
    Owner

    @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.

  3. changed the title [-]JewishCalendar day beginning?[/-] [+]Begin JewishCalendar day At Sunset or Nightfall[/+] on Nov 29, 2022
  4. ZevyaDev commented on Dec 4, 2022

    @ZevyaDev

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions