Skip to content

Commit 8221e28

Browse files
authored
Fix null handling in getSunTransit(Date,Date) (#243)
1 parent b3fedc6 commit 8221e28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ public Date getSolarMidnight() {
598598
*/
599599
public Date getSunTransit(Date startOfDay, Date endOfDay) {
600600
long temporalHour = getTemporalHour(startOfDay, endOfDay);
601+
if (temporalHour == Long.MIN_VALUE) {
602+
return null;
603+
}
601604
return getTimeOffset(startOfDay, temporalHour * 6);
602605
}
603606

0 commit comments

Comments
 (0)