You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comparing yesterday's date with .compare(.isTomorrow), the function is returning true which is wrong.
Example:
letdate=Date()lettomorrow= date.offset(.day, value:1)!
letyesterday= date.offset(.day, value:-1)!
//In version 5.0.1, these comparison returns `true`, which is a bug.
if tomorrow.compare(.isYesterday){print(".isYesterday COMPARISION WRONG")}
if yesterday.compare(.isTomorrow){print(".isTomorrow COMPARISION WRONG")}
The same happens for comparing the following DateComparisonType
When comparing yesterday's date with
.compare(.isTomorrow)
, the function is returningtrue
which is wrong.Example:
The same happens for comparing the following
DateComparisonType
The text was updated successfully, but these errors were encountered: