Class

CLKTimeIntervalTextProvider

A formatted time range.

Declaration

@interface CLKTimeIntervalTextProvider : CLKTextProvider

Overview

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 is 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 is 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

Topics

Creating the Text Provider

+ textProviderWithStartDate:endDate:

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

+ textProviderWithStartDate:endDate:timeZone:

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

Getting the Time Information

startDate

The start date for the time interval.

endDate

The end date for the time interval.

timeZone

The time zone used to format time values.

Relationships

Inherits From

See Also

Data Providers

CLKDateTextProvider

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

CLKImageProvider

An image displayed by a complication.

CLKFullColorImageProvider

A full-color image displayed by a complication.

CLKRelativeDateTextProvider

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

CLKSimpleTextProvider

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

CLKTextProvider

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

CLKTimeTextProvider

A formatted time value.

CLKSimpleGaugeProvider

A gauge that shows a fractional value.

CLKTimeIntervalGaugeProvider

A gauge that tracks time intervals.

CLKGaugeProvider

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

CLKSimpleGaugeProviderFillFractionEmpty

A fill value indicating an empty gauge.

CLKGaugeProviderStyle

Visual styles available for gauges.