androidx.compose.material3

DatePickerFormatter

Interface

No hand-written docs yet.

A date formatter interface used by DatePicker.

interface DatePickerFormatter

How to get one

Ready-made values and functions that return it

Used by

Parameters that take a DatePickerFormatter.

Functions

formatMonthYear

fun formatMonthYear(monthMillis: Long?, locale: CalendarLocale): String?

Format a given monthMillis to a string representation of the month and the year (i.e. January 2023).

formatDate

fun formatDate(
    dateMillis: Long?,
    locale: CalendarLocale,
    forContentDescription: Boolean = false,
): String?

Format a given dateMillis to a string representation of the date (i.e. Mar 27, 2021).

Library docs

A date formatter interface used by DatePicker.