# TimeInterval

Artifact: [androidx.wear.watchface:watchface-complications-data-source](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/datasource/ComplicationDataTimeline.kt+class:androidx.wear.watchface.complications.datasource.TimeInterval) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0)

*** ** * ** ***

<br />

```
class TimeInterval
```

<br />

*** ** * ** ***

A time interval, typically used to describe the validity period of a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimelineEntry`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#TimeInterval(java.time.Instant,java.time.Instant)(start: https://developer.android.com/reference/java/time/Instant.html, end: https://developer.android.com/reference/java/time/Instant.html)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#end()` The `https://developer.android.com/reference/java/time/Instant.html` when this TimeInterval becomes invalid, must be after `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#start()` |
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#start()` The `https://developer.android.com/reference/java/time/Instant.html` when this TimeInterval becomes valid |

## Public constructors

### TimeInterval

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0)

```
TimeInterval(start: Instant, end: Instant)
```

| Parameters |
|---|---|
| `start: https://developer.android.com/reference/java/time/Instant.html` | The `https://developer.android.com/reference/java/time/Instant.html` when this TimeInterval becomes valid |
| `end: https://developer.android.com/reference/java/time/Instant.html` | The `https://developer.android.com/reference/java/time/Instant.html` when this TimeInterval becomes invalid, must be after `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#start()` |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### end

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0)

```
var end: Instant
```

The `https://developer.android.com/reference/java/time/Instant.html` when this TimeInterval becomes invalid, must be after `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/datasource/TimeInterval#start()`

### start

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0)

```
var start: Instant
```

The `https://developer.android.com/reference/java/time/Instant.html` when this TimeInterval becomes valid