---
title: "isEqual(to:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsdateinterval/isequal(to:)"
---

# isEqual(to:)

Indicates whether the receiver is equal to the specified date interval.

## Declaration

```swift
func isEqual(to dateInterval: DateInterval) -> Bool
```

## Parameters

- `dateInterval`: The date interval with which to check the receiver for equality.

## Return Value

Return Value true if the startDate and duration of dateInterval and the receiver are equal. Otherwise, false.

## See Also

### Comparing Date Intervals

- [compare(_:)](foundation/nsdateinterval/compare(_:).md)
