Skip to content

Commit 35eef61

Browse files
authored
fix yerushalmi yomi class (#190)
1 parent 67cffe9 commit 35eef61

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ public class YerushalmiYomiCalculator {
4545
* Returns the <a href="https://en.wikipedia.org/wiki/Daf_Yomi">Daf Yomi</a>
4646
* <a href="https://en.wikipedia.org/wiki/Jerusalem_Talmud">Yerusalmi</a> page ({@link Daf}) for a given date.
4747
* The first Daf Yomi cycle started on 15 Shevat (Tu Bishvat), 5740 (February, 2, 1980) and calculations
48-
* prior to this date will result in an IllegalArgumentException thrown.
49-
*
48+
* prior to this date will result in an IllegalArgumentException thrown. A null will be returned on Tisha B'Av or
49+
* Yom Kippur.
50+
*
5051
* @param calendar
5152
* the calendar date for calculation
52-
* @return the {@link Daf}.
53-
*
53+
* @return the {@link Daf} or null if the date is on Tisha B'Av or Yom Kippur.
54+
*
5455
* @throws IllegalArgumentException
5556
* if the date is prior to the February 2, 1980, the start of the first Daf Yomi Yerushalmi cycle
5657
*/
@@ -61,11 +62,11 @@ public static Daf getDafYomiYerushalmi(JewishCalendar calendar) {
6162
Calendar requested = calendar.getGregorianCalendar();
6263
int masechta = 0;
6364
Daf dafYomi = null;
64-
65-
// There isn't Daf Yomi in Yom Kippur and Tisha Beav.
65+
66+
// There isn't Daf Yomi on Yom Kippur or Tisha B'Av.
6667
if ( calendar.getYomTovIndex() == JewishCalendar.YOM_KIPPUR ||
67-
calendar.getYomTovIndex() == JewishCalendar.TISHA_BEAV ) {
68-
return new Daf(39,0);
68+
calendar.getYomTovIndex() == JewishCalendar.TISHA_BEAV ) {
69+
return null;
6970
}
7071

7172

0 commit comments

Comments
 (0)