zmanim icon indicating copy to clipboard operation
zmanim copied to clipboard

Flaw in logic?

Open Sternbach-Software opened this issue 2 years ago • 2 comments

Shouldn't this be >= instead of >? If 30 minutes is equal to the second zman, return 30 minutes (or the other zman, depending on how you look at it). Is this not semantically equivalent to Math.max()? https://github.com/KosherJava/zmanim/blob/d24323b295779dd4922dccf418afc54e420e592a/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java#L1860

Same for this: https://github.com/KosherJava/zmanim/blob/d24323b295779dd4922dccf418afc54e420e592a/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java#L4025

Sternbach-Software avatar Jul 10 '23 21:07 Sternbach-Software

Does it practically make a difference? It will be the same Date eitherway if equal

Elyahu41 avatar Jul 10 '23 21:07 Elyahu41

True, but if it is >=, Math.max would be clearer.

Sternbach-Software avatar Jul 10 '23 22:07 Sternbach-Software