---
title: "intersection(with:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/dateinterval/intersection(with:)"
---

# intersection(with:)

Returns an interval that represents the interval where the given date interval and the current instance intersect.

## Declaration

```swift
func intersection(with dateInterval: DateInterval) -> DateInterval?
```

## Discussion

Discussion In the event that there is no intersection, the method returns nil.

## See Also

### Determining Intersections

- [intersects(_:)](foundation/dateinterval/intersects(_:).md)
