Skip to content

Commit 4ac62f3

Browse files
authored
Add Yaaleh Veyavo and Al Hanissim
Closes #198
1 parent 07375e1 commit 4ac62f3

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

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

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ public boolean isMoridHatalRecited(JewishCalendar jewishCalendar) {
372372
}
373373

374374
/**
375-
* Returns if <em>hallel</em> is recited on the day in question. This will return true for both <em>hallel shalem</em>
376-
* and <em>chatzi hallel</em>. See {@link #isHallelShalemRecited(JewishCalendar)} to know if the complete <em>hallel</em>
375+
* Returns if <em>Hallel</em> is recited on the day in question. This will return true for both <em>Hallel shalem</em>
376+
* and <em>Chatzi Hallel</em>. See {@link #isHallelShalemRecited(JewishCalendar)} to know if the complete <em>Hallel</em>
377377
* is recited.
378378
*
379379
* @param jewishCalendar the Jewish calendar day.
380-
* @return if <em>hallel</em> is recited.
380+
* @return if <em>Hallel</em> is recited.
381381
* @see #isHallelShalemRecited(JewishCalendar)
382382
*/
383383
public boolean isHallelRecited(JewishCalendar jewishCalendar) {
@@ -440,6 +440,39 @@ public boolean isHallelShalemRecited(JewishCalendar jewishCalendar) {
440440
return false;
441441
}
442442

443+
/**
444+
* Returns if <a href="https://en.wikipedia.org/wiki/Al_HaNissim"><em>Al HaNissim</em></a> is recited on the day in question.
445+
*
446+
* @param jewishCalendar the Jewish calendar day.
447+
* @return if <em>al hanissim</em> is recited.
448+
* @see JewishCalendar#isChanukah()
449+
* @see JewishCalendar#isPurim()
450+
* @see JewishCalendar#getIsMukafChoma()
451+
*/
452+
public boolean isAlHanissimRecited(JewishCalendar jewishCalendar) {
453+
return jewishCalendar.isPurim() || jewishCalendar.isChanukah();
454+
}
455+
456+
/**
457+
* Returns if <em>Yaaleh Veyavo</em> is recited on the day in question.
458+
*
459+
* @param jewishCalendar the Jewish calendar day.
460+
* @return if <em>Yaaleh Veyavo</em> is recited.
461+
* @see JewishCalendar#isPesach()
462+
* @see JewishCalendar#isShavuos()
463+
* @see JewishCalendar#isRoshHashana()
464+
* @see JewishCalendar#isYomKippur()
465+
* @see JewishCalendar#isSuccos()
466+
* @see JewishCalendar#isShminiAtzeres()
467+
* @see JewishCalendar#isSimchasTorah()
468+
* @see JewishCalendar#isRoshChodesh()
469+
*/
470+
public boolean isYaalehVeyavoRecited(JewishCalendar jewishCalendar) {
471+
return jewishCalendar.isPesach() || jewishCalendar.isShavuos() ||jewishCalendar.isRoshHashana() || jewishCalendar.isYomKippur()
472+
|| jewishCalendar.isSuccos() || jewishCalendar.isShminiAtzeres() || jewishCalendar.isSimchasTorah()
473+
|| jewishCalendar.isRoshChodesh();
474+
}
475+
443476
/**
444477
* Is <em>tachanun</em> recited during the week of Purim, from the 11th through the 17th of {@link
445478
* JewishDate#ADAR <em>Adar</em>} (on a non-leap year, or {@link JewishDate#ADAR_II <em>Adar II</em>} on a leap year). Some

0 commit comments

Comments
 (0)