Bug in KCJewishCalendar.m -workingDateAdjustedForSunset implementation
Benny-iPhone opened this issue · 0 comments
Benny-iPhone commented
Code is:
BOOL isAfterSunset = [[self sunset] timeIntervalSinceNow] < 0;
Which might be correct when testing current time. But when check for future/past time (or running a unit-test) this can lead to an error.
I think it's better to compare to workingDate like the next implementation:
BOOL isAfterSunset = (self.workingDate.timeIntervalSince1970 - [self sunset].timeIntervalSince1970) > 0;