Skip to content

Commit 2cde426

Browse files
authored
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
1 parent 46800aa commit 2cde426

1 file changed

Lines changed: 109 additions & 43 deletions

File tree

src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java

Lines changed: 109 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@
5050
* @todo The following items may be added at a future date.
5151
* <ol>
5252
* <li><em>Lamnatzaiach</em></li>
53-
* <li><em>Mizmor Lesoda</em></li>
54-
* <li><em>Behab</em></li>
5553
* <li><em>Selichos</em></li>
5654
* <li>...</li>
5755
* </ol>
@@ -142,12 +140,30 @@ public class TefilaRules {
142140
private boolean tachanunRecitedMinchaAllYear = true;
143141

144142
/**
145-
* Returns if <em>tachanun</em> is recited during <em>shacharis</em> on the day in question. See the many
146-
* <em>minhag</em> based settings that are available in this class.
143+
* The default value is <code>false</code>.
144+
* @see #isMizmorLesodaRecited(JewishCalendar)
145+
* @see #setMizmorLesodaRecitedErevYomKippurAndPesach(boolean)
146+
*/
147+
private boolean mizmorLesodaRecitedErevYomKippurAndPesach = false;
148+
149+
/**
150+
* Returns if <em>tachanun</em> is recited during <em>shacharis</em> on the day in question. There are the many
151+
* <em>minhagim</em> based settings that are available in this class that control what days are set for
152+
* <em>tachanun</em> recital.
147153
*
148154
* @param jewishCalendar the Jewish calendar day.
149155
* @return if <em>tachanun</em> is recited during <em>shacharis</em>.
150156
* @see #isTachanunRecitedMincha(JewishCalendar)
157+
* @see #isTachanunRecitedSundays()
158+
* @see #isTachanunRecitedFridays()
159+
* @see #isTachanunRecitedEndOfTishrei()
160+
* @see #isTachanunRecitedWeekAfterShavuos()
161+
* @see #isTachanunRecited13SivanOutOfIsrael()
162+
* @see #isTachanunRecitedPesachSheni()
163+
* @see #isTachanunRecited15IyarOutOfIsrael()
164+
* @see #isTachanunRecitedShivasYemeiHamiluim()
165+
* @see #isTachanunRecitedWeekOfPurim()
166+
* @see #isTachanunRecitedWeekOfHod()
151167
*/
152168
public boolean isTachanunRecitedShacharis(JewishCalendar jewishCalendar) {
153169
int holidayIndex = jewishCalendar.getYomTovIndex();
@@ -474,7 +490,30 @@ public boolean isYaalehVeyavoRecited(JewishCalendar jewishCalendar) {
474490
}
475491

476492
/**
477-
* Is <em>tachanun</em> recited during the week of Purim, from the 11th through the 17th of {@link
493+
* Returns if Is <em>Mizmor Lesoda</em> is recited on the day in question.
494+
* @param jewishCalendar the Jewish calendar day.
495+
* @return if <em>Mizmor Lesoda</em> is recited.
496+
*
497+
* @see #isMizmorLesodaRecitedErevYomKippurAndPesach()
498+
*
499+
*/
500+
public boolean isMizmorLesodaRecited(JewishCalendar jewishCalendar) {
501+
if(jewishCalendar.isAssurBemelacha()) {
502+
return false;
503+
}
504+
505+
int holidayIndex = jewishCalendar.getYomTovIndex();
506+
if(! isMizmorLesodaRecitedErevYomKippurAndPesach()
507+
&& (holidayIndex == JewishCalendar.EREV_YOM_KIPPUR
508+
|| holidayIndex == JewishCalendar.EREV_PESACH
509+
|| jewishCalendar.isCholHamoedPesach())) {
510+
return false;
511+
}
512+
return true;
513+
}
514+
515+
/**
516+
* Is <em>tachanun</em> set to be recited during the week of Purim, from the 11th through the 17th of {@link
478517
* JewishDate#ADAR <em>Adar</em>} (on a non-leap year, or {@link JewishDate#ADAR_II <em>Adar II</em>} on a leap year). Some
479518
* <em>chasidishe</em> communities do not recite <em>tachanun</em> during this period. See the <a href=
480519
* "https://www.nli.org.il/he/books/NNL_ALEPH001141272/NLI">Minhag Yisrael Torah</a> 131 and <a href=
@@ -504,9 +543,9 @@ public void setTachanunRecitedWeekOfPurim(boolean tachanunRecitedWeekOfPurim) {
504543
}
505544

506545
/**
507-
* Is <em>tachanun</em> recited during the <em>sefira</em> week of <em>Hod</em> (14 - 20 {@link JewishDate#IYAR <em>Iyar</em>},
508-
* or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() <em>Omer</em>}). Some <em>chasidishe</em> communities
509-
* do not recite <em>tachanun</em> during this week. See Minhag Yisrael Torah 131:Iyar.
546+
* Is <em>tachanun</em> set to be recited during the <em>sefira</em> week of <em>Hod</em> (14 - 20 {@link
547+
* JewishDate#IYAR <em>Iyar</em>}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() <em>Omer</em>}). Some
548+
* <em>chasidishe</em> communities do not recite <em>tachanun</em> during this week. See Minhag Yisrael Torah 131:Iyar.
510549
* @return If <em>tachanun</em> is set to be recited during the <em>sefira</em> week of <em>Hod</em> (14 - 20 {@link
511550
* JewishDate#IYAR <em>Iyar</em>}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() <em>Omer</em>}).
512551
* @see #setTachanunRecitedWeekOfHod(boolean)
@@ -516,8 +555,8 @@ public boolean isTachanunRecitedWeekOfHod() {
516555
}
517556

518557
/**
519-
* Sets if <em>tachanun</em> should be recited during the <em>sefira</em> week of <em>Hod</em> (14 - 20 {@link JewishDate#IYAR
520-
* <em>Iyar</em>}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() <em>Omer</em>}).
558+
* Sets if <em>tachanun</em> should should be recited during the <em>sefira</em> week of <em>Hod</em> (14 - 20
559+
* {@link JewishDate#IYAR <em>Iyar</em>}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() <em>Omer</em>}).
521560
* @param tachanunRecitedWeekOfHod Sets if <em>tachanun</em> should be recited during the <em>sefira</em> week of
522561
* <em>Hod</em>.
523562
* @see #isTachanunRecitedWeekOfHod()
@@ -527,9 +566,9 @@ public void setTachanunRecitedWeekOfHod(boolean tachanunRecitedWeekOfHod) {
527566
}
528567

529568
/**
530-
* Is <em>tachanun</em> recited at the end Of {@link JewishDate#TISHREI <em>Tishrei</em>}.The Magen Avraham 669:1 and the Pri
531-
* Chadash 131:7 state that some places to not recite <em>tachanun</em> during this period. The Sh"UT Chasam Sofer on Choshen
532-
* Mishpat 77 writes that this is the <em>minhag</em> in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses
569+
* Is <em>tachanun</em> set to be recited at the end Of {@link JewishDate#TISHREI <em>Tishrei</em>}.The Magen Avraham 669:1 and
570+
* the Pri Chadash 131:7 state that some places to not recite <em>tachanun</em> during this period. The Sh"UT Chasam Sofer on
571+
* Choshen Mishpat 77 writes that this is the <em>minhag</em> in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses
533572
* Hagdola who also states that it should not be recited. The Aderes wanted to institute saying <em>tachanun</em> during this
534573
* period, but was dissuaded from this by Rav Shmuel Salant who did not want to change the <em>minhag</em> in Yerushalayim.
535574
* The Aruch Hashulchan is of the opinion that that this <em>minhag</em> is incorrect, and it should be recited, and The Chazon
@@ -551,10 +590,10 @@ public void setTachanunRecitedEndOfTishrei(boolean tachanunRecitedEndOfTishrei)
551590
}
552591

553592
/**
554-
* Is <em>tachanun</em> recited during the week after <em>Shavuos</em>. This is the opinion of the Pri Megadim
555-
* quoted by the Mishna Berurah. This is since <em>karbanos</em> of <em>Shavuos</em> have <em>tashlumim</em> for
556-
* 7 days, it is still considered like a Yom Tov. The Chazon Ish quoted in the Orchos Rabainu vol. 1 page 68
557-
* recited <em>tachanun</em> during this week.
593+
* Is <em>tachanun</em> set to be recited during the week after <em>Shavuos</em>. This is the opinion of the Pri
594+
* Megadim quoted by the Mishna Berurah. This is since <em>karbanos</em> of <em>Shavuos</em> have <em>tashlumim</em>
595+
* for 7 days, it is still considered like a <em>Yom Tov</em>. The Chazon Ish quoted in the Orchos Rabainu vol. 1
596+
* page 68 recited <em>tachanun</em> during this week.
558597
*
559598
* @return If <em>tachanun</em> is set to be recited during the week after Shavuos.
560599
* @see #setTachanunRecitedWeekAfterShavuos(boolean)
@@ -573,7 +612,7 @@ public void setTachanunRecitedWeekAfterShavuos(boolean tachanunRecitedWeekAfterS
573612
}
574613

575614
/**
576-
* Is <em>tachanun</em> is recited on the 13th of {@link JewishDate#SIVAN <em>Sivan</em>} (<a href=
615+
* Is <em>tachanun</em> is set to be recited on the 13th of {@link JewishDate#SIVAN <em>Sivan</em>} (<a href=
577616
* "https://en.wikipedia.org/wiki/Yom_tov_sheni_shel_galuyot"><em>Yom Tov Sheni shel Galuyos</em></a> of the 7th
578617
* day) outside Israel. This is brought down by the Shaarie Teshuva 131:19 quoting the <a href=
579618
* "https://hebrewbooks.org/pdfpager.aspx?req=41295&st=&pgnum=39">Sheyarei Kneses Hagedola 131:12</a>that
@@ -608,14 +647,14 @@ public void setTachanunRecited13SivanOutOfIsrael(boolean tachanunRecitedThirteen
608647
}
609648

610649
/**
611-
* Is <em>tachanun</em> recited on {@link JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>}. The Pri Chadash 131:7 states
612-
* that <em>tachanun</em> should not be recited. The Aruch Hashulchan states that this is the minhag of the <em>sephardim</em>.
613-
* the Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod, Chodesh Iyar).
614-
* The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in <a href=
615-
* "https://he.wikipedia.org/wiki/%D7%A9%D7%A8%D7%99%D7%94_%D7%93%D7%91%D7%9C%D7%99%D7%A6%D7%A7%D7%99">Rav Sheraya
650+
* Is <em>tachanun</em> set to be recited on {@link JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>}. The Pri Chadash 131:7
651+
* states that <em>tachanun</em> should not be recited. The Aruch Hashulchan states that this is the minhag of the
652+
* <em>sephardim</em>. The Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod,
653+
* Chodesh Iyar). The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in
654+
* <a href="https://he.wikipedia.org/wiki/%D7%A9%D7%A8%D7%99%D7%94_%D7%93%D7%91%D7%9C%D7%99%D7%A6%D7%A7%D7%99">Rav Sheraya
616655
* Devlitzky's</a> comments).
617656
*
618-
* @return If <em>tachanun</em> is recited on {@link JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>}.
657+
* @return If <em>tachanun</em> is set to be recited on {@link JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>}.
619658
* @see #setTachanunRecitedPesachSheni(boolean)
620659
*/
621660
public boolean isTachanunRecitedPesachSheni() {
@@ -632,13 +671,13 @@ public void setTachanunRecitedPesachSheni(boolean tachanunRecitedPesachSheni) {
632671
}
633672

634673
/**
635-
* Is <em>tachanun</em> recited on 15 {@link JewishDate#IYAR <em>Iyar</em>} (<em>sfaika deyoma</em> of {@link JewishCalendar#PESACH_SHENI
636-
* <em>Pesach Sheni</em>}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is <code>true</code> this will be
637-
* ignored even if <code>false</code>.
674+
* Is <em>tachanun</em> set to be recited on 15 {@link JewishDate#IYAR <em>Iyar</em>} (<em>sfaika deyoma</em> of {@link
675+
* JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is
676+
* <code>true</code> this will be ignored even if <code>false</code>.
638677
*
639-
* @return if <em>tachanun</em> is recited on 15 {@link JewishDate#IYAR <em>Iyar</em>} (<em>sfaika deyoma</em> of {@link
640-
* JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>} out of Israel. If {@link #isTachanunRecitedPesachSheni()}
641-
* is <code>true</code> this will be ignored even if <code>false</code>.
678+
* @return if <em>tachanun</em> is set to be recited on 15 {@link JewishDate#IYAR <em>Iyar</em>} (<em>sfaika deyoma</em>
679+
* of {@link JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>} out of Israel. If
680+
* {@link #isTachanunRecitedPesachSheni()} is <code>true</code> this will be ignored even if <code>false</code>.
642681
* @see #setTachanunRecited15IyarOutOfIsrael(boolean)
643682
* @see #setTachanunRecitedPesachSheni(boolean)
644683
* @see #isTachanunRecitedPesachSheni()
@@ -662,8 +701,9 @@ public void setTachanunRecited15IyarOutOfIsrael(boolean tachanunRecited15IyarOut
662701
}
663702

664703
/**
665-
* Is <em>tachanun</em> recited on <em>mincha</em> on <em>erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}</em>.
666-
* @return if <em>tachanun</em> is recited in <em>mincha</em> on <em>erev</em>
704+
* Is <em>tachanun</em> set to be recited on <em>mincha</em> on <em>erev {@link JewishCalendar#LAG_BAOMER Lag
705+
* Baomer}</em>.
706+
* @return if <em>tachanun</em> is set to be recited in <em>mincha</em> on <em>erev</em>
667707
* {@link JewishCalendar#LAG_BAOMER <em>Lag Baomer</em>}.
668708
* @see #setTachanunRecitedMinchaErevLagBaomer(boolean)
669709
*/
@@ -682,14 +722,14 @@ public void setTachanunRecitedMinchaErevLagBaomer(boolean tachanunRecitedMinchaE
682722
}
683723

684724
/**
685-
* Is <em>tachanun</em> recited during the <em>Shivas Yemei Hamiluim</em>, from the 23 of {@link
725+
* Is <em>tachanun</em> set to be recited during the <em>Shivas Yemei Hamiluim</em>, from the 23 of {@link
686726
* JewishDate#ADAR <em>Adar</em>} on a non-leap-year or {@link JewishDate#ADAR_II <em>Adar II</em>} on a
687727
* leap year to the end of the month. Some <em>chasidishe</em> communities do not say <em>tachanun</em>
688728
* during this week. See <a href="https://hebrewbooks.org/pdfpager.aspx?req=4692&st=&pgnum=70">Darkei
689729
* Chaim Veshalom 191</a>.
690-
* @return if <em>tachanun</em> is recited during the <em>Shivas Yemei Hamiluim</em>, from the 23 of {@link
691-
* JewishDate#ADAR <em>Adar</em>} on a non-leap-year or {@link JewishDate#ADAR_II <em>Adar II</em>}
692-
* on a leap year to the end of the month.
730+
* @return if <em>tachanun</em> is set to be recited during the <em>Shivas Yemei Hamiluim</em>, from the 23
731+
* of {@link JewishDate#ADAR <em>Adar</em>} on a non-leap-year or {@link JewishDate#ADAR_II
732+
* <em>Adar II</em>} on a leap year to the end of the month.
693733
* @see #setTachanunRecitedShivasYemeiHamiluim(boolean)
694734
*/
695735
public boolean isTachanunRecitedShivasYemeiHamiluim() {
@@ -709,10 +749,10 @@ public void setTachanunRecitedShivasYemeiHamiluim(boolean tachanunRecitedShivasY
709749
}
710750

711751
/**
712-
* Is <em>tachanun</em> recited on Fridays. Some <em>chasidishe</em> communities do not recite
752+
* Is <em>tachanun</em> set to be recited on Fridays. Some <em>chasidishe</em> communities do not recite
713753
* <em>tachanun</em> on Fridays. See <a href="https://hebrewbooks.org/pdfpager.aspx?req=41190&st=&pgnum=10">Likutei
714754
* Maharich Vol 2 Seder Hanhagos Erev Shabbos</a>. This is also the <em>minhag</em> in Satmar.
715-
* @return if <em>tachanun</em> is recited on Fridays.
755+
* @return if <em>tachanun</em> is set to be recited on Fridays.
716756
* @see #setTachanunRecitedFridays(boolean)
717757
*/
718758
public boolean isTachanunRecitedFridays() {
@@ -730,10 +770,10 @@ public void setTachanunRecitedFridays(boolean tachanunRecitedFridays) {
730770
}
731771

732772
/**
733-
* Is <em>tachanun</em> recited on Sundays. Some <em>chasidishe</em> communities do not recite
773+
* Is <em>tachanun</em> set to be recited on Sundays. Some <em>chasidishe</em> communities do not recite
734774
* <em>tachanun</em> on Sundays. See <a href="https://hebrewbooks.org/pdfpager.aspx?req=41190&st=&pgnum=10">Likutei
735775
* Maharich Vol 2 Seder Hanhagos Erev Shabbos</a>.
736-
* @return if <em>tachanun</em> is recited on Sundays.
776+
* @return if <em>tachanun</em> is set to be recited on Sundays.
737777
* @see #setTachanunRecitedSundays(boolean)
738778
*/
739779
public boolean isTachanunRecitedSundays() {
@@ -751,10 +791,10 @@ public void setTachanunRecitedSundays(boolean tachanunRecitedSundays) {
751791
}
752792

753793
/**
754-
* Is <em>tachanun</em> recited in <em>Mincha</em> the entire year. Some <em>chasidishe</em> communities do not recite
755-
* <em>tachanun</em> by <em>Mincha</em> all year round. See<a href=
794+
* Is <em>tachanun</em> set to be recited in <em>Mincha</em> the entire year. Some <em>chasidishe</em> communities do
795+
* not recite <em>tachanun</em> by <em>Mincha</em> all year round. See <a href=
756796
* "https://hebrewbooks.org/pdfpager.aspx?req=4751&st=&pgnum=105">Nemukei Orach Chaim 131:3</a>.
757-
* @return if <em>tachanun</em> is recited in <em>Mincha</em> the entire year.
797+
* @return if <em>tachanun</em> is set to be recited in <em>Mincha</em> the entire year.
758798
* @see #setTachanunRecitedMinchaAllYear(boolean)
759799
*/
760800
public boolean isTachanunRecitedMinchaAllYear() {
@@ -771,4 +811,30 @@ public boolean isTachanunRecitedMinchaAllYear() {
771811
public void setTachanunRecitedMinchaAllYear(boolean tachanunRecitedMinchaAllYear) {
772812
this.tachanunRecitedMinchaAllYear = tachanunRecitedMinchaAllYear;
773813
}
814+
815+
/**
816+
* Sets if <em>Mizmor Lesoda</em> should be recited on <em>Erev Yom Kippur</em>, <em>Erev Pesach</em> and <em>Chol
817+
* Hamoed Pesach</em>. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do. The
818+
* default value is <code>false</code>.
819+
* @param mizmorLesodaRecitedErevYomKippurAndPesach Sets if <em>Mizmor Lesoda</em> should be recited on <em>Erev Yom
820+
* Kippur</em>, <em>Erev Pesach</em> and <em>Chol Hamoed Pesach</em>. If set to true (the default value is
821+
* <code>false</code>).
822+
* @see #isTachanunRecitedMinchaAllYear()
823+
*/
824+
public void setMizmorLesodaRecitedErevYomKippurAndPesach(boolean mizmorLesodaRecitedErevYomKippurAndPesach) {
825+
this.mizmorLesodaRecitedErevYomKippurAndPesach = mizmorLesodaRecitedErevYomKippurAndPesach;
826+
}
827+
828+
/**
829+
* Is <em>Mizmor Lesoda</em> set to be recited on <em>Erev Yom Kippur</em>, <em>Erev Pesach</em> and <em>Chol
830+
* Hamoed Pesach</em>. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do.
831+
* The default value is <code>false</code>.
832+
* @return if <em>Mizmor Lesoda</em> is set to be recited on <em>Erev Yom Kippur</em>, <em>Erev Pesach</em> and
833+
* <em>Chol Hamoed Pesach</em>. If set to true (the default value is <code>false</code>).
834+
* @see #isMizmorLesodaRecited(JewishCalendar)
835+
*/
836+
public boolean isMizmorLesodaRecitedErevYomKippurAndPesach() {
837+
return mizmorLesodaRecitedErevYomKippurAndPesach;
838+
}
839+
774840
}

0 commit comments

Comments
 (0)