core / io.islandtime.format / PlatformDateTimeTextProvider / parsableTextFor

parsableTextFor

(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun parsableTextFor(field: DateTimeField, styles: Set<TextStyle>, locale: <ERROR CLASS>): ParsableTextList

Get a list of all localized text in a set of styles along with the values associated that text. The list will be sorted in descending order by the length of text, making it suitable for parsing.

Any text with conflicting values will be excluded. For example, the English narrow month name "M" could be March or May, so any attempt to parse it would be ambiguous.

Parameters

field - the field to get text for

styles - the set of styles to include

locale - the locale

Return
the list of parsable text -- empty if the field is invalid or no styles are specified

(jvm) fun parsableTextFor(field: DateTimeField, styles: Set<TextStyle>, locale: Locale): ParsableTextList

Overrides DateTimeTextProvider.parsableTextFor

Get a list of all localized text in a set of styles along with the values associated that text. The list will be sorted in descending order by the length of text, making it suitable for parsing.

Any text with conflicting values will be excluded. For example, the English narrow month name "M" could be March or May, so any attempt to parse it would be ambiguous.

Parameters

field - the field to get text for

styles - the set of styles to include

locale - the locale

Return
the list of parsable text -- empty if the field is invalid or no styles are specified