Instance Method

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.

See Also

Determining Intersections

func intersects(DateInterval) -> Bool

Indicates whether this interval intersects the specified interval.