Skip to content

Commit

Permalink
fix yerushalmi yomi class (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elyahu41 authored Sep 13, 2022
1 parent 67cffe9 commit 35eef61
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ public class YerushalmiYomiCalculator {
* Returns the <a href="https://en.wikipedia.org/wiki/Daf_Yomi">Daf Yomi</a>
* <a href="https://en.wikipedia.org/wiki/Jerusalem_Talmud">Yerusalmi</a> page ({@link Daf}) for a given date.
* The first Daf Yomi cycle started on 15 Shevat (Tu Bishvat), 5740 (February, 2, 1980) and calculations
* prior to this date will result in an IllegalArgumentException thrown.
*
* prior to this date will result in an IllegalArgumentException thrown. A null will be returned on Tisha B'Av or
* Yom Kippur.
*
* @param calendar
* the calendar date for calculation
* @return the {@link Daf}.
*
* @return the {@link Daf} or null if the date is on Tisha B'Av or Yom Kippur.
*
* @throws IllegalArgumentException
* if the date is prior to the February 2, 1980, the start of the first Daf Yomi Yerushalmi cycle
*/
Expand All @@ -61,11 +62,11 @@ public static Daf getDafYomiYerushalmi(JewishCalendar calendar) {
Calendar requested = calendar.getGregorianCalendar();
int masechta = 0;
Daf dafYomi = null;
// There isn't Daf Yomi in Yom Kippur and Tisha Beav.

// There isn't Daf Yomi on Yom Kippur or Tisha B'Av.
if ( calendar.getYomTovIndex() == JewishCalendar.YOM_KIPPUR ||
calendar.getYomTovIndex() == JewishCalendar.TISHA_BEAV ) {
return new Daf(39,0);
calendar.getYomTovIndex() == JewishCalendar.TISHA_BEAV ) {
return null;
}


Expand Down

0 comments on commit 35eef61

Please sign in to comment.