localizedText

Parse localized text associated with a particular DateTimeField in any of the specified styles. If successful, the field's value will be populated. If no text is known for the field or a match can't be found, the parsing operation will return an error.

The locale used when matching text is determined by the DateTimeParserSettings in use. Text is provided by the configured DateTimeTextProvider. Be mindful that this text may differ between platforms and devices. If at all possible, non-localized representations should be used instead.

See also

DateTimeParserSettings.locale
Link copied to clipboard

DateTimeTextProvider
Link copied to clipboard

Parameters

field

the field to match text for

styles

the styles of text to match

abstract fun localizedText(field: DateTimeField, styles: Set<TextStyle>)