---
title: "compareStartDate(with:)"
framework: eventkit
role: symbol
role_heading: Instance Method
path: "eventkit/ekevent/comparestartdate(with:)"
---

# compareStartDate(with:)

Compares the start date of the receiving event with the start date of another event.

## Declaration

```swift
func compareStartDate(with other: EKEvent) -> ComparisonResult
```

## Parameters

- `other`: The event to compare against.

## Mentioned in

Retrieving events and reminders

## Return Value

Return Value Returns ComparisonResult.orderedAscending if the start date of the receiver precedes the start date of other. Returns ComparisonResult.orderedSame if the start dates of the two events are identical. Returns ComparisonResult.orderedDescending if the start date of the receiver comes after the start date of other.

## Discussion

Discussion You can pass the selector for this method to the NSArray method sortedArray(using:) to create an array of events sorted by start date.
