-
Notifications
You must be signed in to change notification settings - Fork 54
added Fast of Firstborns, however only on years where it doesn't fall on Erev Pesach. #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… on Erev Pesach. Needs updating.
| } | ||
| if (day == 14) { | ||
| return EREV_PESACH; | ||
| return EREV_PESACH;//TODO add Fast of firstborns with Erev Pesach |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into a problem here with only being able to return one result. I'm not sure what you want to do with the future of this method, so I just left a TODO comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does't this mean that if it's the 13th of the month and it's friday that it will return that today is taanit bechorot? don't we push up taanit bechorot to thursday the 12th?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elijulian yes, it will start from Thursday night through Friday. This how the getYomTovIndex method works. It looks at the day of the current date, not the night before it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in essence the 12th is Erev Ta'anit Bechorot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Elyahu41
I would argue that the day (either the 12th or 14th) is never called the "day of Taanis Bechoros", rather there is a minhag (brought down lehalacha, but still a minhag)to fast on erev pesach and that fast that is usually on Erev Pesach, but sometimes is on a different date. I would not have the YT index change for this. I was considering adding the day to isTaanis(), but that can honestly be confusing as well since it is not a regular taanis. As per the Mishna Berura on 470:2 no. 7, the taanis is only a minhag. In no. 2 the Mishna Berura mentions that it is a taanis yachid and that it is preferable to avoid saying aneinu in chazaras hashatz (if there are 10 bechorim fasting we should avoid having a bechor as the shaliach tzibur) since we do not mention a taanis in Nissan publicly. Vayechal is not recited (mentioned in 566:2 in Biur Halacha Veyesh).
In short, my feeling is that this does not fit into the API at this point the way you coded it. Adding an isTaanisBechorim() method is a possibility, but I am not 100% sure about that. The way I would code it is below.
/**
* Return true if the day is Taanis Bechorim (on erev Pesach). It will return true for the 14th of Nissan if it is not
* on Shabbos, or if the 12th of Nissan occurs on a Thursday
*
* @return true if today is the fast of Bechorim
*/
public boolean isTaanisBechorim() {
final int day = getJewishDayOfMonth();
final int dayOfWeek = getDayOfWeek();
// on 14 Nisan unless that is Shabbos where the fast is moved back to Thursday
return getJewishMonth() == NISSAN && ((day == 14 && dayOfWeek != Calendar.SATURDAY) ||
(day == 12 && dayOfWeek == Calendar.THURSDAY ));
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elijulian I double checked, and you were right. I was assuming that the fast was on Friday. My bad. Good thing @KosherJava is here to keep us in check lol.
|
I know this implementation isn't perfect, but I figured that it's a start. |
Needs updating.