File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/main/java/com/kosherjava/zmanim/hebrewcalendar Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -89,13 +89,19 @@ public static Daf getDafYomiYerushalmi(JewishCalendar calendar) {
8989 }
9090
9191 // Start to calculate current cycle. init the start day
92+ prevCycle .setTime (DAF_YOMI_START_DAY .getTime ());
9293 nextCycle .setTime (DAF_YOMI_START_DAY .getTime ());
94+ // Move the nextCycle to the last day of the current cycle
95+ nextCycle = TimeZoneUtils .addDay (nextCycle , WHOLE_SHAS_DAFS - 1 );
96+ nextCycle = TimeZoneUtils .addDay (nextCycle , getNumOfSpecialDays (prevCycle , nextCycle ));
9397
9498 // Go cycle by cycle, until we get the next cycle
9599 while (requested .after (nextCycle )) {
100+ // Move the prevCycle from the 1st day of the current cycle to the 1st day of the next cycle
96101 prevCycle .setTime (nextCycle .getTime ());
97-
98- // Adds the number of whole shas dafs. and the number of days that not have daf.
102+ prevCycle = TimeZoneUtils .addDay (prevCycle , 1 );
103+
104+ // Move the nextCycle from the last day of the current cycle to the last day of the next cycle
99105 nextCycle = TimeZoneUtils .addDay (nextCycle , WHOLE_SHAS_DAFS );
100106 nextCycle = TimeZoneUtils .addDay (nextCycle , getNumOfSpecialDays (prevCycle , nextCycle ));
101107 }
@@ -116,6 +122,7 @@ public static Daf getDafYomiYerushalmi(JewishCalendar calendar) {
116122 total -= i ;
117123 masechta ++;
118124 }
125+
119126
120127 return dafYomi ;
121128 }
You can’t perform that action at this time.
0 commit comments