<!--
{
  "availability" : [
    "watchOS: 5.0.0 - 27.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "ClockKit",
  "identifier" : "/documentation/ClockKit/CLKTimeIntervalGaugeProvider/init(style:gaugeColors:gaugeColorLocations:start:end:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ClockKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CLKTimeIntervalGaugeProvider(cm)gaugeProviderWithStyle:gaugeColors:gaugeColorLocations:startDate:endDate:"
  },
  "title" : "init(style:gaugeColors:gaugeColorLocations:start:end:)"
}
-->

# init(style:gaugeColors:gaugeColorLocations:start:end:)

Creates a time interval gauge that fills as time passes.

```
convenience init(style: CLKGaugeProviderStyle, gaugeColors: [UIColor]?, gaugeColorLocations: [NSNumber]?, start startDate: Date, end endDate: Date)
```

## Parameters

`style`

The style defining the gauge’s visual appearance. For a list of valid styles, see [`CLKGaugeProviderStyle`](/documentation/ClockKit/CLKGaugeProviderStyle).

`gaugeColors`

The gauge’s colors. These colors are displayed as a gradient.

`gaugeColorLocations`

The location of each color along the gauge. Locations are values between `0.0` and `1.0`. If `nil`, the colors are evenly spaced along the gauge.

`startDate`

The start time and date.

`endDate`

the end time and date. This value must be later than or equal to the start date.

## Return Value

A newly instantiated time interval gauge provider.

## Discussion

The gauge shows the amount of time that has elapsed, based on the current time relative to the specified start and end dates. The gauge fills as it counts up from the start time to the end time.

If you provide both colors and locations, then the `gaugeColors` and `gaugeColorLocations` arrays must be the same length.

---

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)