intersection(with:)
Returns an interval that represents the interval where the given date interval and the current instance intersect.
Declaration
func intersection(with dateInterval: DateInterval) -> DateInterval?Discussion
In the event that there is no intersection, the method returns nil.