<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "EventKit",
  "identifier" : "/documentation/EventKit/EKEvent/compareStartDate(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "EventKit"
    ],
    "preciseIdentifier" : "c:objc(cs)EKEvent(im)compareStartDateWithEvent:"
  },
  "title" : "compareStartDate(with:)"
}
-->

# compareStartDate(with:)

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

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

## Parameters

`other`

The event to compare against.

## Return Value

Returns <doc://com.apple.documentation/documentation/Foundation/ComparisonResult/orderedAscending> if the start date of the receiver precedes the start date of `other`. Returns <doc://com.apple.documentation/documentation/Foundation/ComparisonResult/orderedSame> if the start dates of the two events are identical. Returns <doc://com.apple.documentation/documentation/Foundation/ComparisonResult/orderedDescending> if the start date of the receiver comes after the start date of `other`.

## Discussion

You can pass the selector for this method to the NSArray method <doc://com.apple.documentation/documentation/Foundation/NSArray/sortedArray(using:)-9nhh9> to create an array of events sorted by start date.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)