DatePickerFormatter
-
Cmn
interface DatePickerFormatter
A date formatter interface used by DatePicker.
Summary
Public functions |
||
|---|---|---|
String? |
formatDate(Format a given |
Cmn
|
String? |
formatMonthYear(monthMillis: Long?, locale: CalendarLocale)Format a given |
Cmn
|
Public functions
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).
| Parameters | |
|---|---|
dateMillis: Long? |
timestamp in UTC milliseconds from the epoch that represents the date |
locale: CalendarLocale |
a |
forContentDescription: Boolean = false |
indicates that the requested formatting is for content description. In these cases, the output may include a more descriptive wording that will be passed to a screen readers. |
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).
| Parameters | |
|---|---|
monthMillis: Long? |
timestamp in UTC milliseconds from the epoch that represents the month |
locale: CalendarLocale |
a |