Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/com/google/wear/services/complications/TimeDependentText#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/com/google/wear/services/complications/TimeDependentText#inhmethods)

# TimeDependentText


`
public


interface
TimeDependentText
`


`


implements

https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText


`

|---|
| com.google.wear.services.complications.TimeDependentText |

|---|
| Known indirect subclasses [TimeDifferenceComplicationText](https://developer.android.com/reference/com/google/wear/services/complications/TimeDifferenceComplicationText), [TimeFormatComplicationText](https://developer.android.com/reference/com/google/wear/services/complications/TimeFormatComplicationText) |---|---| | [TimeDifferenceComplicationText](https://developer.android.com/reference/com/google/wear/services/complications/TimeDifferenceComplicationText) | Class to generate string representations of time differences. | | [TimeFormatComplicationText](https://developer.android.com/reference/com/google/wear/services/complications/TimeFormatComplicationText) | Class to generate string representations of dates/times according to a specified format. | |

<br />

*** ** * ** ***

Interface for any object that returns different text depending on the given timestamp.

Note: The preferred way to define dynamic data for complication text is to use a `https://developer.android.com/reference/com/google/wear/services/complications/DynamicComplicationText`. That will be the only supported way to use this data in the future.

## Summary

| ### Public methods ||
|---|---|
| ` abstract long` | ` https://developer.android.com/reference/com/google/wear/services/complications/TimeDependentText#getNextChangeTimeMillis(long)(long fromTime) ` Returns the next time after `fromTime` at which the text may change. |
| ` abstract boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/TimeDependentText#returnsSameTextAt(long,%20long)(long firstDateTimeMillis, long secondDateTimeMillis) ` Returns true if the result of the calculation of the current text will be the same for both `firstDateTimeMillis` and `secondDateTimeMillis`. |

| ### Inherited methods |
|---|---|
| From interface ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText ` |---|---| | ` default boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText#isPlaceholder()() ` Returns if this `ComplicationText` is a placeholder. | ||

## Public methods

### getNextChangeTimeMillis

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract long getNextChangeTimeMillis (long fromTime)
```

Returns the next time after `fromTime` at which the text may change.

<br />

| Parameters ||
|---|---|
| `fromTime` | `long` <br /> |

| Returns ||
|---|---|
| `long` | <br /> |

### returnsSameTextAt

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean returnsSameTextAt (long firstDateTimeMillis, 
                long secondDateTimeMillis)
```

Returns true if the result of the calculation of the current text will be the same for both
`firstDateTimeMillis` and `secondDateTimeMillis`.

<br />

| Parameters ||
|---|---|
| `firstDateTimeMillis` | `long` <br /> |
| `secondDateTimeMillis` | `long` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |