---
title: "getTimelineEndDate(for:withHandler:)"
framework: clockkit
role: symbol
role_heading: Instance Method
path: "clockkit/clkcomplicationdatasource/gettimelineenddate(for:withhandler:)"
---

# getTimelineEndDate(for:withHandler:)

Retrieves the last date for the data that your app can supply.

## Declaration

```swift
optional func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void)
```

```swift
optional func timelineEndDate(for complication: CLKComplication) async -> Date?
```

## Parameters

- `complication`: The complication tied to the request.
- `handler`: The handler to execute with the end date. This block has no return value and takes the following parameter:

## Mentioned in

Loading future timeline events Sharing an Apple Watch face

## Discussion

Discussion Your implementation of this method must execute the block in the handler parameter and specify the date. If your application can’t provide future timeline entries, specify the current date. If you don’t implement this method, ClockKit doesn’t attempt to retrieve timeline entries after the current entry. important: In watchOS 6 and earlier, if you passed nil to the completion handler, ClockKit set the timeline end date to distantFuture. In watchOS 7 and later, it assumes your app can’t provide future data, and only asks for the current timeline entry.

## See Also

### Deprecated methods

- [CLKLaunchedTimelineEntryDateKey](clockkit/clklaunchedtimelineentrydatekey.md)
- [CLKLaunchedComplicationIdentifierKey](clockkit/clklaunchedcomplicationidentifierkey.md)
- [getComplicationDescriptors(handler:)](clockkit/clkcomplicationdatasource/getcomplicationdescriptors(handler:).md)
- [handleSharedComplicationDescriptors(_:)](clockkit/clkcomplicationdatasource/handlesharedcomplicationdescriptors(_:).md)
- [getLocalizableSampleTemplate(for:withHandler:)](clockkit/clkcomplicationdatasource/getlocalizablesampletemplate(for:withhandler:).md)
- [getPrivacyBehavior(for:withHandler:)](clockkit/clkcomplicationdatasource/getprivacybehavior(for:withhandler:).md)
- [CLKComplicationPrivacyBehavior](clockkit/clkcomplicationprivacybehavior.md)
- [getAlwaysOnTemplate(for:withHandler:)](clockkit/clkcomplicationdatasource/getalwaysontemplate(for:withhandler:).md)
- [getCurrentTimelineEntry(for:withHandler:)](clockkit/clkcomplicationdatasource/getcurrenttimelineentry(for:withhandler:).md)
- [getTimelineEntries(for:after:limit:withHandler:)](clockkit/clkcomplicationdatasource/gettimelineentries(for:after:limit:withhandler:).md)
- [getTimelineAnimationBehavior(for:withHandler:)](clockkit/clkcomplicationdatasource/gettimelineanimationbehavior(for:withhandler:).md)
- [CLKComplicationTimelineAnimationBehavior](clockkit/clkcomplicationtimelineanimationbehavior.md)
- [getSupportedTimeTravelDirections(for:withHandler:)](clockkit/clkcomplicationdatasource/getsupportedtimetraveldirections(for:withhandler:).md)
- [CLKComplicationTimeTravelDirections](clockkit/clkcomplicationtimetraveldirections.md)
- [getTimelineStartDate(for:withHandler:)](clockkit/clkcomplicationdatasource/gettimelinestartdate(for:withhandler:).md)
