Closed CompuGenius-Programs closed 1 year ago
@CompuGenius Thanks for the suggestions.
@KosherJava thanks for your prompt reply.
isTishaBav()
, I created it for the Nacheim prayer by mincha.isRoshChodesh()
function - only a const named ROSH_CHODESH
that is never used (from what I can tell).SHUSHAN_PURIM
or not?@CompuGenius ,
@KosherJava,
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.
@KosherJava I understand the usage of the constants, but ROSH_CHODESH
is never used.
Just wanted to point it out.
Alright, the only dangling suggestion is isTishaBav()
for Nacheim, up to you to add.
Closing this now, thanks!
I would have left it open until I actually addressed the items that can be addressed.
Oh, I had figured that you had decided to not implement isTishaBav()
.
I also just realized I had forgotten about isAlHanissim()
and isYaalehVyavo()
lol.
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.
@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.
isCholHamoedPesach()
andisCholHamoedSuccos()
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.
@CompuGenius , as far as I can tell, this is all done with the recent commits. Please let me know if anything was missed.
LGTM 😁
All the above functions will work except
isRoshChodesh()
. For some reason, the constROSH_CHODESH
does not seem to be used. Why is that?