11/*
22 * Zmanim Java API
3- * Copyright (C) 2019 - 2023 Eliyahu Hershfeld
3+ * Copyright (C) 2019 - 2024 Eliyahu Hershfeld
44 * Copyright (C) 2019 - 2021 Y Paritcher
55 *
66 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
4545 * System.out.println(hdf.format(jewishCalendar) + ": " + tr.isTachanunRecitedShacharis(jewishCalendar));</pre>
4646 *
4747 * @author © Y. Paritcher 2019 - 2021
48- * @author © Eliyahu Hershfeld 2019 - 2023
48+ * @author © Eliyahu Hershfeld 2019 - 2024
4949 *
5050 * @todo The following items may be added at a future date.
5151 * <ol>
@@ -171,29 +171,29 @@ public boolean isTachanunRecitedShacharis(JewishCalendar jewishCalendar) {
171171 int month = jewishCalendar .getJewishMonth ();
172172
173173 if (jewishCalendar .getDayOfWeek () == Calendar .SATURDAY
174- || (!tachanunRecitedSundays && jewishCalendar .getDayOfWeek () == Calendar .SUNDAY )
175- || (!tachanunRecitedFridays && jewishCalendar .getDayOfWeek () == Calendar .FRIDAY )
174+ || (! tachanunRecitedSundays && jewishCalendar .getDayOfWeek () == Calendar .SUNDAY )
175+ || (! tachanunRecitedFridays && jewishCalendar .getDayOfWeek () == Calendar .FRIDAY )
176176 || month == JewishDate .NISSAN
177- || (month == JewishDate .TISHREI && ((!tachanunRecitedEndOfTishrei && day > 8 )
177+ || (month == JewishDate .TISHREI && ((! tachanunRecitedEndOfTishrei && day > 8 )
178178 || (tachanunRecitedEndOfTishrei && (day > 8 && day < 22 ))))
179179 || (month == JewishDate .SIVAN && (tachanunRecitedWeekAfterShavuos && day < 7
180- || !tachanunRecitedWeekAfterShavuos && day < (!jewishCalendar .getInIsrael ()
181- && !tachanunRecited13SivanOutOfIsrael ? 14 : 13 )))
182- || ( jewishCalendar .isYomTov () && (! jewishCalendar .isTaanis ()
183- || (!tachanunRecitedPesachSheni && holidayIndex == JewishCalendar .PESACH_SHENI ))) // Erev YT is included in isYomTov( )
184- || (!jewishCalendar .getInIsrael () && !tachanunRecitedPesachSheni && !tachanunRecited15IyarOutOfIsrael
180+ || ! tachanunRecitedWeekAfterShavuos && day < (! jewishCalendar .getInIsrael ()
181+ && ! tachanunRecited13SivanOutOfIsrael ? 14 : 13 )))
182+ || jewishCalendar . isErevYomTov () || ( jewishCalendar .isYomTov () && (! jewishCalendar .isTaanis () //FIXME logic needs review for 15 shevat
183+ || (! tachanunRecitedPesachSheni && holidayIndex == JewishCalendar .PESACH_SHENI )))
184+ || (! jewishCalendar .getInIsrael () && ! tachanunRecitedPesachSheni && ! tachanunRecited15IyarOutOfIsrael
185185 && jewishCalendar .getJewishMonth () == JewishDate .IYAR && day == 15 )
186186 || holidayIndex == JewishCalendar .TISHA_BEAV || jewishCalendar .isIsruChag ()
187187 || jewishCalendar .isRoshChodesh ()
188- || (!tachanunRecitedShivasYemeiHamiluim &&
189- ((!jewishCalendar .isJewishLeapYear () && month == JewishDate .ADAR )
188+ || (! tachanunRecitedShivasYemeiHamiluim &&
189+ ((! jewishCalendar .isJewishLeapYear () && month == JewishDate .ADAR )
190190 || (jewishCalendar .isJewishLeapYear () && month == JewishDate .ADAR_II )) && day > 22 )
191- || (!tachanunRecitedWeekOfPurim &&
192- ((!jewishCalendar .isJewishLeapYear () && month == JewishDate .ADAR )
191+ || (! tachanunRecitedWeekOfPurim &&
192+ ((! jewishCalendar .isJewishLeapYear () && month == JewishDate .ADAR )
193193 || (jewishCalendar .isJewishLeapYear () && month == JewishDate .ADAR_II )) && day > 10 && day < 18 )
194194 || (jewishCalendar .isUseModernHolidays ()
195195 && (holidayIndex == JewishCalendar .YOM_HAATZMAUT || holidayIndex == JewishCalendar .YOM_YERUSHALAYIM ))
196- || (!tachanunRecitedWeekOfHod && month == JewishDate .IYAR && day > 13 && day < 21 )) {
196+ || (! tachanunRecitedWeekOfHod && month == JewishDate .IYAR && day > 13 && day < 21 )) {
197197 return false ;
198198 }
199199 return true ;
@@ -210,7 +210,7 @@ public boolean isTachanunRecitedMincha(JewishCalendar jewishCalendar) {
210210 JewishCalendar tomorrow = (JewishCalendar ) jewishCalendar .clone ();
211211 tomorrow .forward (Calendar .DATE , 1 );
212212
213- if (!tachanunRecitedMinchaAllYear
213+ if (! tachanunRecitedMinchaAllYear
214214 || jewishCalendar .getDayOfWeek () == Calendar .FRIDAY
215215 || ! isTachanunRecitedShacharis (jewishCalendar )
216216 || (! isTachanunRecitedShacharis (tomorrow ) &&
@@ -243,7 +243,7 @@ public boolean isTachanunRecitedMincha(JewishCalendar jewishCalendar) {
243243 public boolean isVeseinTalUmatarStartDate (JewishCalendar jewishCalendar ) {
244244 if (jewishCalendar .getInIsrael ()) {
245245 // The 7th Cheshvan can't occur on Shabbos, so always return true for 7 Cheshvan
246- return jewishCalendar .getJewishMonth () == JewishDate .CHESHVAN && jewishCalendar .getJewishDayOfMonth () == 7 ;
246+ return jewishCalendar .getJewishMonth () == JewishDate .CHESHVAN && jewishCalendar .getJewishDayOfMonth () == 7 ;
247247 } else {
248248 if (jewishCalendar .getDayOfWeek () == Calendar .SATURDAY ) { //Not recited on Friday night
249249 return false ;
@@ -254,7 +254,7 @@ public boolean isVeseinTalUmatarStartDate(JewishCalendar jewishCalendar) {
254254 return jewishCalendar .getTekufasTishreiElapsedDays () == 47 ;
255255 }
256256 }
257- }
257+ }
258258
259259 /**
260260 * Returns true if tonight is the first night to start reciting <em>Vesein Tal Umatar Livracha</em> (
@@ -276,7 +276,7 @@ public boolean isVeseinTalUmatarStartDate(JewishCalendar jewishCalendar) {
276276 public boolean isVeseinTalUmatarStartingTonight (JewishCalendar jewishCalendar ) {
277277 if (jewishCalendar .getInIsrael ()) {
278278 // The 7th Cheshvan can't occur on Shabbos, so always return true for 6 Cheshvan
279- return jewishCalendar .getJewishMonth () == JewishDate .CHESHVAN && jewishCalendar .getJewishDayOfMonth () == 6 ;
279+ return jewishCalendar .getJewishMonth () == JewishDate .CHESHVAN && jewishCalendar .getJewishDayOfMonth () == 6 ;
280280 } else {
281281 if (jewishCalendar .getDayOfWeek () == Calendar .FRIDAY ) { //Not recited on Friday night
282282 return false ;
@@ -287,7 +287,7 @@ public boolean isVeseinTalUmatarStartingTonight(JewishCalendar jewishCalendar) {
287287 return jewishCalendar .getTekufasTishreiElapsedDays () == 46 ;
288288 }
289289 }
290- }
290+ }
291291
292292 /**
293293 * Returns if <em>Vesein Tal Umatar Livracha</em> (<em>Sheailas Geshamim</em>) is recited. This will return
@@ -323,7 +323,7 @@ public boolean isVeseinTalUmatarRecited(JewishCalendar jewishCalendar) {
323323 * @see #isVeseinTalUmatarRecited(JewishCalendar)
324324 */
325325 public boolean isVeseinBerachaRecited (JewishCalendar jewishCalendar ) {
326- return !isVeseinTalUmatarRecited (jewishCalendar );
326+ return ! isVeseinTalUmatarRecited (jewishCalendar );
327327 }
328328
329329 /**
@@ -377,7 +377,7 @@ public boolean isMashivHaruachRecited(JewishCalendar jewishCalendar) {
377377 * @return true if <em>Morid Hatal</em> (or the lack of reciting <em>Mashiv Haruach</em> following <em>nussach Ashkenaz</em>) is recited.
378378 */
379379 public boolean isMoridHatalRecited (JewishCalendar jewishCalendar ) {
380- return !isMashivHaruachRecited (jewishCalendar ) || isMashivHaruachStartDate (jewishCalendar ) || isMashivHaruachEndDate (jewishCalendar );
380+ return ! isMashivHaruachRecited (jewishCalendar ) || isMashivHaruachStartDate (jewishCalendar ) || isMashivHaruachEndDate (jewishCalendar );
381381 }
382382
383383 /**
@@ -403,23 +403,23 @@ public boolean isHallelRecited(JewishCalendar jewishCalendar) {
403403 }
404404 switch (month ) {
405405 case JewishDate .NISSAN :
406- if (day >= 15 && ((inIsrael && day <= 21 ) || (!inIsrael && day <= 22 ))){
406+ if (day >= 15 && ((inIsrael && day <= 21 ) || (! inIsrael && day <= 22 ))){
407407 return true ;
408408 }
409409 break ;
410410 case JewishDate .IYAR : // modern holidays
411- if (jewishCalendar .isUseModernHolidays () && (holidayIndex == JewishCalendar .YOM_HAATZMAUT
411+ if (jewishCalendar .isUseModernHolidays () && (holidayIndex == JewishCalendar .YOM_HAATZMAUT
412412 || holidayIndex == JewishCalendar .YOM_YERUSHALAYIM )){
413413 return true ;
414414 }
415415 break ;
416416 case JewishDate .SIVAN :
417- if (day == 6 || (!inIsrael && (day == 7 ))){
417+ if (day == 6 || (! inIsrael && (day == 7 ))){
418418 return true ;
419419 }
420420 break ;
421421 case JewishDate .TISHREI :
422- if (day >= 15 && (day <= 22 || (!inIsrael && (day <= 23 )))){
422+ if (day >= 15 && (day <= 22 || (! inIsrael && (day <= 23 )))){
423423 return true ;
424424 }
425425 }
@@ -440,7 +440,7 @@ public boolean isHallelShalemRecited(JewishCalendar jewishCalendar) {
440440 boolean inIsrael = jewishCalendar .getInIsrael ();
441441 if (isHallelRecited (jewishCalendar )) {
442442 if ((jewishCalendar .isRoshChodesh () && ! jewishCalendar .isChanukah ())
443- || (month == JewishDate .NISSAN && ((inIsrael && day > 15 ) || (!inIsrael && day > 16 )))) {
443+ || (month == JewishDate .NISSAN && ((inIsrael && day > 15 ) || (! inIsrael && day > 16 )))) {
444444 return false ;
445445 } else {
446446 return true ;
@@ -459,7 +459,7 @@ public boolean isHallelShalemRecited(JewishCalendar jewishCalendar) {
459459 * @see JewishCalendar#getIsMukafChoma()
460460 */
461461 public boolean isAlHanissimRecited (JewishCalendar jewishCalendar ) {
462- return jewishCalendar .isPurim () || jewishCalendar .isChanukah ();
462+ return jewishCalendar .isPurim () || jewishCalendar .isChanukah ();
463463 }
464464
465465 /**
@@ -477,14 +477,14 @@ public boolean isAlHanissimRecited(JewishCalendar jewishCalendar) {
477477 * @see JewishCalendar#isRoshChodesh()
478478 */
479479 public boolean isYaalehVeyavoRecited (JewishCalendar jewishCalendar ) {
480- return jewishCalendar .isPesach () || jewishCalendar .isShavuos () ||jewishCalendar .isRoshHashana () || jewishCalendar .isYomKippur ()
481- || jewishCalendar .isSuccos () || jewishCalendar .isShminiAtzeres () || jewishCalendar .isSimchasTorah ()
482- || jewishCalendar .isRoshChodesh ();
480+ return jewishCalendar .isPesach () || jewishCalendar .isShavuos () ||jewishCalendar .isRoshHashana () || jewishCalendar .isYomKippur ()
481+ || jewishCalendar .isSuccos () || jewishCalendar .isShminiAtzeres () || jewishCalendar .isSimchasTorah ()
482+ || jewishCalendar .isRoshChodesh ();
483483 }
484484
485485 /**
486486 * Returns if Is <em>Mizmor Lesoda</em> is recited on the day in question.
487- * @param jewishCalendar the Jewish calendar day.
487+ * @param jewishCalendar the Jewish calendar day.
488488 * @return if <em>Mizmor Lesoda</em> is recited.
489489 *
490490 * @see #isMizmorLesodaRecitedErevYomKippurAndPesach()
@@ -502,7 +502,7 @@ public boolean isMizmorLesodaRecited(JewishCalendar jewishCalendar) {
502502 || jewishCalendar .isCholHamoedPesach ())) {
503503 return false ;
504504 }
505- return true ;
505+ return true ;
506506 }
507507
508508 /**
@@ -668,7 +668,7 @@ public void setTachanunRecitedPesachSheni(boolean tachanunRecitedPesachSheni) {
668668 * JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is
669669 * <code>true</code> this will be ignored even if <code>false</code>.
670670 *
671- * @return if <em>tachanun</em> is set to be recited on 15 {@link JewishDate#IYAR <em>Iyar</em>} (<em>sfaika deyoma</em>
671+ * @return if <em>tachanun</em> is set to be recited on 15 {@link JewishDate#IYAR <em>Iyar</em>} (<em>sfaika deyoma</em>
672672 * of {@link JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>} out of Israel. If
673673 * {@link #isTachanunRecitedPesachSheni()} is <code>true</code> this will be ignored even if <code>false</code>.
674674 * @see #setTachanunRecited15IyarOutOfIsrael(boolean)
@@ -680,7 +680,7 @@ public boolean isTachanunRecited15IyarOutOfIsrael() {
680680 }
681681
682682 /**
683- * Sets if <em>tachanun</em> should be recited on the 15th of {@link JewishDate#IYAR <em>Iyar</em>} (<a href=
683+ * Sets if <em>tachanun</em> should be recited on the 15th of {@link JewishDate#IYAR <em>Iyar</em>} (<a href=
684684 * "https://en.wikipedia.org/wiki/Yom_tov_sheni_shel_galuyot"><em>Yom Tov Sheni shel Galuyos</em></a> of
685685 * {@link JewishCalendar#PESACH_SHENI <em>Pesach Sheni</em>}) out of Israel. Ignored if {@link
686686 * #isTachanunRecitedPesachSheni()} is <code>true</code>.
0 commit comments