DateInterval

DateInterval represents a closed date interval in the form of [startDate, endDate]. It is possible for the start and end dates to be the same with a duration of 0. DateInterval does not support reverse intervals i.e. intervals where the duration is less than 0 and the end date occurs earlier in time than the start date.

iOS
10.0+
macOS
10.12+
tvOS
10.0+
watchOS
3.0+
struct DateInterval