The new TefilaRules class has been added to the KosherJava Zmanim Library. This will be included in the upcoming v2.4.0 release. The TefilaRules class was added in an effort to help zmanim calendar authors who sometimes require knowing if תחנון tachanun is recited on a specific day in order to set tefila times (such as mincha starting X minutes before shkiah, and a few minutes later if tachanun is not recited). It is also useful for siddur app creators. With many different minhagim (mostly chasidishe) about when tachanun is recited, the class currently supports 12 different options that can allow setting the rules for a majority of minhagim.
Yahrzeits such as 7 Adar, (Moshe Rabbeinu’s yahrzeit) or holidays celebrated by specific communities such as Purim Mezhbizh (Medzhybizh) celebrated on 11 Teves or Purim Saragossa celebrated on the 17th of Shevat (the Wikipedia date seems to be in error), are not (and likely never will be) supported by this class.
Other tefila related rules such as the existing Mashiv Haruach etc. rules were moved over from the JewishCalendar class to this new class where they have a more natural fit. The methods that were migrated over, were deprecated in the JewishCalendar class and will be removed in v3.0.0.
Key Methods in the TefilaRules Class
The following are the key methods in the new TefilaRules class.
- Shemoneh Esreh Rules
- isMashivHaruachRecited(JewishCalendar)
- isMashivHaruachStartDate(JewishCalendar)
- isMashivHaruachEndDate(JewishCalendar)
- isMoridHatalRecited(JewishCalendar)
- isVeseinTalUmatarRecited(JewishCalendar)
- isVeseinTalUmatarStartingTonight(JewishCalendar)
- isVeseinTalUmatarStartDate(JewishCalendar)
- isVeseinBerachaRecited(JewishCalendar)
- Tachanun Rules
- Hallel Rules
- Possible Future Additions
- Lamnatzaiach
- Mizmor Lesoda
- Selichos
Yom Kippur Kattanadded to JewishCalendarHallel Shalem / Chatzi HalleladdedBeHaBadded to JewishCalendar- Vihi Noam on Motzai Shabbos
- …
Sample Code
TefilaRules tr = new TefilaRules(); JewishCalendar jCal = new JewishCalendar(); HebrewDateFormatter hdf = new HebrewDateFormatter(); hdf.setHebrewFormat(true); // Hebrew formatting jCal.setJewishDate(5783, JewishDate.TISHREI, 1); // Rosh Hashana System.out.println(hdf.format(jCal) + " - Is tachanun recited: " + tr.isTachanunRecitedShacharis(jCal)); jCal.setJewishDate(5729, JewishDate.SHEVAT, 21); System.out.println(hdf.format(jCal) + " - is mashiv haruch recited: " + tr.isMashivHaruachRecited(jCal)); jCal.setJewishDate(5783, JewishDate.ADAR, 17); System.out.println(hdf.format(jCal) + " - Is tachanun recited: " + tr.isTachanunRecitedShacharis(jCal)); tr.setTachanunRecitedWeekOfPurim(false); //default is true System.out.println(hdf.format(jCal) + " - Is tachanun recited: " + tr.isTachanunRecitedShacharis(jCal));
Output:
א׳ תשרי תשפ״ג - Is tachanun recited: false כ״א שבט תשכ״ט - is mashiv haruch recited: true י״ז אדר תשפ״ג - Is tachanun recited: true י״ז אדר תשפ״ג - Is tachanun recited: false