GithubHelp home page GithubHelp logo

Comments (14)

KosherJava avatar KosherJava commented on August 15, 2024

@CompuGenius
Thanks for the suggestions.

  1. isTishaBav() is overkill since we do not have an isTzomGedalia(), isShivaasarBetamuz(), IsTaanisEsther etc. We do have isTaanis(). If you can make a good case for it, I will reconsider.
  2. JewishCalendar.isRoshChodesh() exists
  3. IsPurim() needs adjustments and setting such as isMukafChoma() for this to work for Yerushalayim and other cities.
  4. isYaalehVyavo() should return true for first and last days of Sukkos as well as Shavuos.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024

@KosherJava thanks for your prompt reply.

  1. Regarding isTishaBav(), I created it for the Nacheim prayer by mincha.
  2. I have version 2.4.0 implemented in gradle and there is no isRoshChodesh() function - only a const named ROSH_CHODESH that is never used (from what I can tell).
  3. That is a good point - forgot. How exactly would I go about validating which cities keep SHUSHAN_PURIM or not?
  4. I specifically did not implement the days of Sukkos or Shavuos because, although I considered that there may be use cases for it, in my circumstance - a dynamic weekday siddur - it is not necessary, C"V.

from zmanim.

KosherJava avatar KosherJava commented on August 15, 2024

@CompuGenius ,

  1. Understood the need
  2. See isRoshChodesh(). I am not sure how it is missing in your version. Indeed the constant is not in use. I will review it.
  3. No way to validate. It is up to the developer to have a setting for it. I already coded it but it is not in GitHub yet. One thing I am not sure of is how to deal with places that have a safek. It is probably too much to deal with at this point, and the implementer can address it without the API.
  4. It would make sense for many non eSiddurim. An example would be a large shul display showing what part of davening is recited such as Parsha, Mashiv Haruach and Yaaleh Veyavo makes sense.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024

@KosherJava,

  1. Obviously up to you, just think it would be helpful.
  2. That it indeed very strange. I just removed the gradle command as listed in the README and instead put what is suggested in #197, which caused gradle to rebuild due to different code, and now it is there. Strange indeed.
  3. Yeah, figured as much. Thanks
  4. Yeah, i figured these as use cases, I just did not bother implementing it myself. Since I knew this one would possibly need to be changed, I created an issue instead of bothering with a PR.

from zmanim.

KosherJava avatar KosherJava commented on August 15, 2024

As far as the constant ROSH_CHODESH, the main use of these constants are in getYomTovIndex(). That returns an int I am not sure that it is worth an effort in returning. I may change my mind down the line.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024

@KosherJava I understand the usage of the constants, but ROSH_CHODESH is never used.
Just wanted to point it out.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024

Alright, the only dangling suggestion is isTishaBav() for Nacheim, up to you to add.

Closing this now, thanks!

from zmanim.

KosherJava avatar KosherJava commented on August 15, 2024

I would have left it open until I actually addressed the items that can be addressed.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024

Oh, I had figured that you had decided to not implement isTishaBav().

I also just realized I had forgotten about isAlHanissim() and isYaalehVyavo() lol.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024
public boolean isPesach() {
    int holidayIndex = getYomTovIndex();
    return holidayIndex == PESACH;
}

public boolean isSuccos() {
    int holidayIndex = getYomTovIndex();
    return holidayIndex == SUCCOS || holidayIndex == HOSHANA_RABBA || holidayIndex == SHEMINI_ATZERES || holidayIndex == SIMCHAS_TORAH;
}

public boolean isShavuos() {
    int holidayIndex = getYomTovIndex();
    return holidayIndex == SHAVUOS;
}

public boolean isPesachHoliday() {
    return isPesach() || isCholHamoedPesach();
}

public boolean isSuccosHoliday() {
    return isSuccos() || isCholHamoedSuccos();
}

public boolean isYaalehVyavo() {
    return isRoshChodesh() || isPesachHoliday() || isSuccosHoliday() || isShavuos();
}

Here's a proper isYaalehVyavo() and helper functions related. I made a separate one for isPesach() or isSuccos() to match isShavuos() and in case there ever is a want to just get those days.

from zmanim.

KosherJava avatar KosherJava commented on August 15, 2024

@CompuGenius ,
isCholHamoedPesach() and isCholHamoedSuccos() already exist. I will add isPesach() etc that will cover the entire YT and you can just call isCholHamoedPesach() or isCholHamoed() to determine things. Too many methods will confuse people.
As far as Yaaleh Veyavo, you missed RH, YK, Shmini Atzers and Simchas Torah. I will deal with it.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024

isCholHamoedPesach() and isCholHamoedSuccos() already exist

I know that. I did not create those functions, rather just called them from my own.

I extracted each boolean to it's own function, which is definitely overboard, but you never know what people need 🤷

As far as Yaaleh Veyavo, you missed RH, YK, Shmini Atzers and Simchas Torah. I will deal with it.

I missed Rosh Hashanah and Yom Kippur, but if you look at my isSuccos() function, it includes Shmini Atzeres and Simchas Torah.

from zmanim.

KosherJava avatar KosherJava commented on August 15, 2024

@CompuGenius , as far as I can tell, this is all done with the recent commits. Please let me know if anything was missed.

from zmanim.

CompuGenius avatar CompuGenius commented on August 15, 2024

LGTM 😁

from zmanim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.