---
title: "getDisplayedMonth"
description: "Returns a [YearMonth] representation of the displayed month in this [DatePickerState]. The
returned [YearMonth] is based on the [DatePickerState.displayedMonthMillis], which represents
midnight of the first day of the displayed month in UTC milliseconds from the epoch."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-jvmAndAndroid'>JvmAndAndroid</div>


```kotlin
@RequiresApi(26)
fun DatePickerState.getDisplayedMonth(): YearMonth
```


Returns a `YearMonth` representation of the displayed month in this `DatePickerState`. The
returned `YearMonth` is based on the `DatePickerState.displayedMonthMillis`, which represents
midnight of the first day of the displayed month in UTC milliseconds from the epoch.

#### Returns

| | |
| --- | --- |
|  | The displayed `YearMonth`. |




<div class='sourceset sourceset-jvmAndAndroid'>JvmAndAndroid</div>


```kotlin
@RequiresApi(26)
fun DateRangePickerState.getDisplayedMonth(): YearMonth
```


Returns a `YearMonth` representation of the displayed month in this `DateRangePickerState`. The
returned `YearMonth` is based on the `DateRangePickerState.displayedMonthMillis`, which
represents midnight of the first day of the displayed month in UTC milliseconds from the epoch.

#### Returns

| | |
| --- | --- |
|  | The displayed `YearMonth`. |




