From 2cde42644dc72a49b3e4228244bc79cc276e138e Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 14 Aug 2023 18:13:59 -0400 Subject: [PATCH] Add isMizmorLesodaRecited() Includes a setting for the Sephardi custom to recide Mizmore Letoda on Erev Pesach, Chol Hamoed Pesach and Erev Yom Kippur. Thanks @CompuGenius. Closes #218 --- .../zmanim/hebrewcalendar/TefilaRules.java | 152 +++++++++++++----- 1 file changed, 109 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java index 913deb43..a78739ef 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java @@ -50,8 +50,6 @@ * @todo The following items may be added at a future date. *
    *
  1. Lamnatzaiach
  2. - *
  3. Mizmor Lesoda
  4. - *
  5. Behab
  6. *
  7. Selichos
  8. *
  9. ...
  10. *
@@ -142,12 +140,30 @@ public class TefilaRules { private boolean tachanunRecitedMinchaAllYear = true; /** - * Returns if tachanun is recited during shacharis on the day in question. See the many - * minhag based settings that are available in this class. + * The default value is false. + * @see #isMizmorLesodaRecited(JewishCalendar) + * @see #setMizmorLesodaRecitedErevYomKippurAndPesach(boolean) + */ + private boolean mizmorLesodaRecitedErevYomKippurAndPesach = false; + + /** + * Returns if tachanun is recited during shacharis on the day in question. There are the many + * minhagim based settings that are available in this class that control what days are set for + * tachanun recital. * * @param jewishCalendar the Jewish calendar day. * @return if tachanun is recited during shacharis. * @see #isTachanunRecitedMincha(JewishCalendar) + * @see #isTachanunRecitedSundays() + * @see #isTachanunRecitedFridays() + * @see #isTachanunRecitedEndOfTishrei() + * @see #isTachanunRecitedWeekAfterShavuos() + * @see #isTachanunRecited13SivanOutOfIsrael() + * @see #isTachanunRecitedPesachSheni() + * @see #isTachanunRecited15IyarOutOfIsrael() + * @see #isTachanunRecitedShivasYemeiHamiluim() + * @see #isTachanunRecitedWeekOfPurim() + * @see #isTachanunRecitedWeekOfHod() */ public boolean isTachanunRecitedShacharis(JewishCalendar jewishCalendar) { int holidayIndex = jewishCalendar.getYomTovIndex(); @@ -474,7 +490,30 @@ public boolean isYaalehVeyavoRecited(JewishCalendar jewishCalendar) { } /** - * Is tachanun recited during the week of Purim, from the 11th through the 17th of {@link + * Returns if Is Mizmor Lesoda is recited on the day in question. + * @param jewishCalendar the Jewish calendar day. + * @return if Mizmor Lesoda is recited. + * + * @see #isMizmorLesodaRecitedErevYomKippurAndPesach() + * + */ + public boolean isMizmorLesodaRecited(JewishCalendar jewishCalendar) { + if(jewishCalendar.isAssurBemelacha()) { + return false; + } + + int holidayIndex = jewishCalendar.getYomTovIndex(); + if(! isMizmorLesodaRecitedErevYomKippurAndPesach() + && (holidayIndex == JewishCalendar.EREV_YOM_KIPPUR + || holidayIndex == JewishCalendar.EREV_PESACH + || jewishCalendar.isCholHamoedPesach())) { + return false; + } + return true; + } + + /** + * Is tachanun set to be recited during the week of Purim, from the 11th through the 17th of {@link * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year). Some * chasidishe communities do not recite tachanun during this period. See the Minhag Yisrael Torah 131 and tachanun recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR Iyar}, - * or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). Some chasidishe communities - * do not recite tachanun during this week. See Minhag Yisrael Torah 131:Iyar. + * Is tachanun set to be recited during the sefira week of Hod (14 - 20 {@link + * JewishDate#IYAR Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). Some + * chasidishe communities do not recite tachanun during this week. See Minhag Yisrael Torah 131:Iyar. * @return If tachanun is set to be recited during the sefira week of Hod (14 - 20 {@link * JewishDate#IYAR Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). * @see #setTachanunRecitedWeekOfHod(boolean) @@ -516,8 +555,8 @@ public boolean isTachanunRecitedWeekOfHod() { } /** - * Sets if tachanun should be recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR - * Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). + * Sets if tachanun should should be recited during the sefira week of Hod (14 - 20 + * {@link JewishDate#IYAR Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). * @param tachanunRecitedWeekOfHod Sets if tachanun should be recited during the sefira week of * Hod. * @see #isTachanunRecitedWeekOfHod() @@ -527,9 +566,9 @@ public void setTachanunRecitedWeekOfHod(boolean tachanunRecitedWeekOfHod) { } /** - * Is tachanun recited at the end Of {@link JewishDate#TISHREI Tishrei}.The Magen Avraham 669:1 and the Pri - * Chadash 131:7 state that some places to not recite tachanun during this period. The Sh"UT Chasam Sofer on Choshen - * Mishpat 77 writes that this is the minhag in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses + * Is tachanun set to be recited at the end Of {@link JewishDate#TISHREI Tishrei}.The Magen Avraham 669:1 and + * the Pri Chadash 131:7 state that some places to not recite tachanun during this period. The Sh"UT Chasam Sofer on + * Choshen Mishpat 77 writes that this is the minhag in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses * Hagdola who also states that it should not be recited. The Aderes wanted to institute saying tachanun during this * period, but was dissuaded from this by Rav Shmuel Salant who did not want to change the minhag in Yerushalayim. * The Aruch Hashulchan is of the opinion that that this minhag is incorrect, and it should be recited, and The Chazon @@ -551,10 +590,10 @@ public void setTachanunRecitedEndOfTishrei(boolean tachanunRecitedEndOfTishrei) } /** - * Is tachanun recited during the week after Shavuos. This is the opinion of the Pri Megadim - * quoted by the Mishna Berurah. This is since karbanos of Shavuos have tashlumim for - * 7 days, it is still considered like a Yom Tov. The Chazon Ish quoted in the Orchos Rabainu vol. 1 page 68 - * recited tachanun during this week. + * Is tachanun set to be recited during the week after Shavuos. This is the opinion of the Pri + * Megadim quoted by the Mishna Berurah. This is since karbanos of Shavuos have tashlumim + * for 7 days, it is still considered like a Yom Tov. The Chazon Ish quoted in the Orchos Rabainu vol. 1 + * page 68 recited tachanun during this week. * * @return If tachanun is set to be recited during the week after Shavuos. * @see #setTachanunRecitedWeekAfterShavuos(boolean) @@ -573,7 +612,7 @@ public void setTachanunRecitedWeekAfterShavuos(boolean tachanunRecitedWeekAfterS } /** - * Is tachanun is recited on the 13th of {@link JewishDate#SIVAN Sivan} (tachanun is set to be recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th * day) outside Israel. This is brought down by the Shaarie Teshuva 131:19 quoting the Sheyarei Kneses Hagedola 131:12that @@ -608,14 +647,14 @@ public void setTachanunRecited13SivanOutOfIsrael(boolean tachanunRecitedThirteen } /** - * Is tachanun recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. The Pri Chadash 131:7 states - * that tachanun should not be recited. The Aruch Hashulchan states that this is the minhag of the sephardim. - * the Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod, Chodesh Iyar). - * The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in Rav Sheraya + * Is tachanun set to be recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. The Pri Chadash 131:7 + * states that tachanun should not be recited. The Aruch Hashulchan states that this is the minhag of the + * sephardim. The Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod, + * Chodesh Iyar). The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in + * Rav Sheraya * Devlitzky's comments). * - * @return If tachanun is recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. + * @return If tachanun is set to be recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. * @see #setTachanunRecitedPesachSheni(boolean) */ public boolean isTachanunRecitedPesachSheni() { @@ -632,13 +671,13 @@ public void setTachanunRecitedPesachSheni(boolean tachanunRecitedPesachSheni) { } /** - * Is tachanun recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI - * Pesach Sheni}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is true this will be - * ignored even if false. + * Is tachanun set to be recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link + * JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is + * true this will be ignored even if false. * - * @return if tachanun is recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link - * JewishCalendar#PESACH_SHENI Pesach Sheni} out of Israel. If {@link #isTachanunRecitedPesachSheni()} - * is true this will be ignored even if false. + * @return if tachanun is set to be recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma + * of {@link JewishCalendar#PESACH_SHENI Pesach Sheni} out of Israel. If + * {@link #isTachanunRecitedPesachSheni()} is true this will be ignored even if false. * @see #setTachanunRecited15IyarOutOfIsrael(boolean) * @see #setTachanunRecitedPesachSheni(boolean) * @see #isTachanunRecitedPesachSheni() @@ -662,8 +701,9 @@ public void setTachanunRecited15IyarOutOfIsrael(boolean tachanunRecited15IyarOut } /** - * Is tachanun recited on mincha on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}. - * @return if tachanun is recited in mincha on erev + * Is tachanun set to be recited on mincha on erev {@link JewishCalendar#LAG_BAOMER Lag + * Baomer}. + * @return if tachanun is set to be recited in mincha on erev * {@link JewishCalendar#LAG_BAOMER Lag Baomer}. * @see #setTachanunRecitedMinchaErevLagBaomer(boolean) */ @@ -682,14 +722,14 @@ public void setTachanunRecitedMinchaErevLagBaomer(boolean tachanunRecitedMinchaE } /** - * Is tachanun recited during the Shivas Yemei Hamiluim, from the 23 of {@link + * Is tachanun set to be recited during the Shivas Yemei Hamiluim, from the 23 of {@link * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II} on a * leap year to the end of the month. Some chasidishe communities do not say tachanun * during this week. See Darkei * Chaim Veshalom 191. - * @return if tachanun is recited during the Shivas Yemei Hamiluim, from the 23 of {@link - * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II} - * on a leap year to the end of the month. + * @return if tachanun is set to be recited during the Shivas Yemei Hamiluim, from the 23 + * of {@link JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II + * Adar II} on a leap year to the end of the month. * @see #setTachanunRecitedShivasYemeiHamiluim(boolean) */ public boolean isTachanunRecitedShivasYemeiHamiluim() { @@ -709,10 +749,10 @@ public void setTachanunRecitedShivasYemeiHamiluim(boolean tachanunRecitedShivasY } /** - * Is tachanun recited on Fridays. Some chasidishe communities do not recite + * Is tachanun set to be recited on Fridays. Some chasidishe communities do not recite * tachanun on Fridays. See Likutei * Maharich Vol 2 Seder Hanhagos Erev Shabbos. This is also the minhag in Satmar. - * @return if tachanun is recited on Fridays. + * @return if tachanun is set to be recited on Fridays. * @see #setTachanunRecitedFridays(boolean) */ public boolean isTachanunRecitedFridays() { @@ -730,10 +770,10 @@ public void setTachanunRecitedFridays(boolean tachanunRecitedFridays) { } /** - * Is tachanun recited on Sundays. Some chasidishe communities do not recite + * Is tachanun set to be recited on Sundays. Some chasidishe communities do not recite * tachanun on Sundays. See Likutei * Maharich Vol 2 Seder Hanhagos Erev Shabbos. - * @return if tachanun is recited on Sundays. + * @return if tachanun is set to be recited on Sundays. * @see #setTachanunRecitedSundays(boolean) */ public boolean isTachanunRecitedSundays() { @@ -751,10 +791,10 @@ public void setTachanunRecitedSundays(boolean tachanunRecitedSundays) { } /** - * Is tachanun recited in Mincha the entire year. Some chasidishe communities do not recite - * tachanun by Mincha all year round. Seetachanun set to be recited in Mincha the entire year. Some chasidishe communities do + * not recite tachanun by Mincha all year round. See Nemukei Orach Chaim 131:3. - * @return if tachanun is recited in Mincha the entire year. + * @return if tachanun is set to be recited in Mincha the entire year. * @see #setTachanunRecitedMinchaAllYear(boolean) */ public boolean isTachanunRecitedMinchaAllYear() { @@ -771,4 +811,30 @@ public boolean isTachanunRecitedMinchaAllYear() { public void setTachanunRecitedMinchaAllYear(boolean tachanunRecitedMinchaAllYear) { this.tachanunRecitedMinchaAllYear = tachanunRecitedMinchaAllYear; } + + /** + * Sets if Mizmor Lesoda should be recited on Erev Yom Kippur, Erev Pesach and Chol + * Hamoed Pesach. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do. The + * default value is false. + * @param mizmorLesodaRecitedErevYomKippurAndPesach Sets if Mizmor Lesoda should be recited on Erev Yom + * Kippur, Erev Pesach and Chol Hamoed Pesach. If set to true (the default value is + * false). + * @see #isTachanunRecitedMinchaAllYear() + */ + public void setMizmorLesodaRecitedErevYomKippurAndPesach(boolean mizmorLesodaRecitedErevYomKippurAndPesach) { + this.mizmorLesodaRecitedErevYomKippurAndPesach = mizmorLesodaRecitedErevYomKippurAndPesach; + } + + /** + * Is Mizmor Lesoda set to be recited on Erev Yom Kippur, Erev Pesach and Chol + * Hamoed Pesach. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do. + * The default value is false. + * @return if Mizmor Lesoda is set to be recited on Erev Yom Kippur, Erev Pesach and + * Chol Hamoed Pesach. If set to true (the default value is false). + * @see #isMizmorLesodaRecited(JewishCalendar) + */ + public boolean isMizmorLesodaRecitedErevYomKippurAndPesach() { + return mizmorLesodaRecitedErevYomKippurAndPesach; + } + }