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 searching by dates matching date components, the repeatedTimePolicy field is not respected if the nanoseconds field is set. For example, we want to find the date expected which is just after a daylight switch:
when nanosecond is set to a value, enumeration always returns the 01:20 before the switch and the assertion fails.
The bug occurs in Calendar.dateAfterMatchingNanosecond(...) in Calendar_Enumerate.swift. This method simply returns a new date using Calendar.date(from: DateComponents), but in the test above there are two dates matching the components, and we need a way to specify if we want the first or second one.
The text was updated successfully, but these errors were encountered:
When searching by dates matching date components, the
repeatedTimePolicy
field is not respected if thenanoseconds
field is set. For example, we want to find the dateexpected
which is just after a daylight switch:when
nanosecond
is set to a value, enumeration always returns the 01:20 before the switch and the assertion fails.The bug occurs in
Calendar.dateAfterMatchingNanosecond(...)
inCalendar_Enumerate.swift
. This method simply returns a new date usingCalendar.date(from: DateComponents)
, but in the test above there are two dates matching the components, and we need a way to specify if we want the first or second one.The text was updated successfully, but these errors were encountered: