# NotificationCompat.Metric.FixedDate

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/NotificationCompat.java+class:androidx.core.app.NotificationCompat.Metric.FixedDate) Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

*** ** * ** ***


```
public final class NotificationCompat.Metric.FixedDate extends NotificationCompat.Metric.MetricValue
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.core.app.NotificationCompat.Metric.MetricValue](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.MetricValue) ||
|   | ↳ | [androidx.core.app.NotificationCompat.Metric.FixedDate](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate) |

*** ** * ** ***

A metric value for showing a date.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#FORMAT_AUTOMATIC() = 0` Formatting option. |
| `static final int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#FORMAT_LONG_DATE() = 1` Formatting option. |
| `static final int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#FORMAT_SHORT_DATE() = 2` Formatting option. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#FixedDate(java.time.LocalDate)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/time/LocalDate.html value)` Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate` where the `https://developer.android.com/reference/java/time/LocalDate.html` will be displayed with `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#FORMAT_AUTOMATIC()`. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#FixedDate(java.time.LocalDate,int)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/time/LocalDate.html value, int format)` Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate` where the `https://developer.android.com/reference/java/time/LocalDate.html` will be displayed in the specified formatting option. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html obj)` |
| `int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#getFormat()()` The formatting option for the `https://developer.android.com/reference/java/time/LocalDate.html` value. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/time/LocalDate.html` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#getValue()()` The `https://developer.android.com/reference/java/time/LocalDate.html` value. |
| `int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#toString()()` |

## Constants

### FORMAT_AUTOMATIC

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final int FORMAT_AUTOMATIC = 0
```

Formatting option. The system will decide how to format the date, and whether to omit any pieces, depending on available space, the relationship between the `https://developer.android.com/reference/java/time/LocalDate.html` and the current date, etc.

### FORMAT_LONG_DATE

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final int FORMAT_LONG_DATE = 1
```

Formatting option. The date will be shown in a longer format, e.g. "Aug 13 2025" (according to the device's locale).

### FORMAT_SHORT_DATE

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public static final int FORMAT_SHORT_DATE = 2
```

Formatting option. The date will be shown in a shorter format, e.g. "13/8/25" (according to the device's locale).

## Public constructors

### FixedDate

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public FixedDate(@NonNull LocalDate value)
```

Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate` where the `https://developer.android.com/reference/java/time/LocalDate.html` will be displayed with `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate#FORMAT_AUTOMATIC()`.

### FixedDate

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public FixedDate(@NonNull LocalDate value, int format)
```

Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedDate` where the `https://developer.android.com/reference/java/time/LocalDate.html` will be displayed in the specified formatting option.

## Public methods

### equals

```
public boolean equals(Object obj)
```

### getFormat

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public int getFormat()
```

The formatting option for the `https://developer.android.com/reference/java/time/LocalDate.html` value.

### getValue

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public @NonNull LocalDate getValue()
```

The `https://developer.android.com/reference/java/time/LocalDate.html` value.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```