A formatted time range.


class CLKTimeIntervalTextProvider : CLKTextProvider


This provider creates strings like “10:15–11:15AM” where the time range may span hours, days, or some larger time interval. The text provider takes into account the user’s region and locale settings.

Time interval strings are more appropriate in complication families where there’s sufficient space to draw the full time range, such as the modular large and utilitarian large families. In families where space is more limited, the provider may display only the start date of the time range.

When formatting the time interval, the time text provider drops the morning/evening indicator of the start time when it’s the same as the end time. Time intervals that are more than 24 hours are displayed as a range of days. The following are some examples of formatted time intervals:

  • 9:30AM - 3:30PM

  • 9:30 - 10:30AM

  • Jan 1 - Jan 7

  • 1/1 - 1/7


Creating the Text Provider

init(start: Date, end: Date)

Creates and returns a text provider with the specified start and end dates.

init(start: Date, end: Date, timeZone: TimeZone?)

Creates and returns a text provider with the specified dates and time zone information.

Getting the Time Information

var startDate: Date

The start date for the time interval.

var endDate: Date

The end date for the time interval.

var timeZone: TimeZone?

The time zone used to format time values.


Inherits From

Conforms To

See Also

Data Providers

class CLKDateTextProvider

A formatted string that conveys a date without any time information.

class CLKImageProvider

An image displayed by a complication.

class CLKFullColorImageProvider

A full-color image displayed by a complication.

class CLKRelativeDateTextProvider

A formatted string that conveys the difference in time between the current date and a date that you specify.

class CLKSimpleTextProvider

A single line of text to display in your complication interface.

class CLKTextProvider

The common behavior for displaying text-based data in a complication.

class CLKTimeTextProvider

A formatted time value.

class CLKSimpleGaugeProvider

A gauge that shows a fractional value.

class CLKTimeIntervalGaugeProvider

A gauge that tracks time intervals.

class CLKGaugeProvider

An abstract superclass that provides all the common behaviors for the gauge providers.

let CLKSimpleGaugeProviderFillFractionEmpty: Float

A fill value indicating an empty gauge.

enum CLKGaugeProviderStyle

Visual styles available for gauges.