Compares two intervals.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 7.1+
This method prioritizes ordering by start date. If the start dates are equal, then it will order by duration. e.g. Given intervals a and b
a would return
.Ordered because a’s start date is earlier in time than b’s start date.
In the event that the start dates are equal, the compare method will attempt to order by duration. e.g. Given intervals c and d
c would result in
.Ordered because c is longer than d.
If both the start dates and the durations are equal, then the intervals are considered equal and
.Ordered is returned as the result.