core / io.islandtime.format / DateTimeTextProvider / parsableTextFor

parsableTextFor

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

Get a list of all localized text in a particular style 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

style - the style of the text

locale - the locale

Return
the list of parsable text -- empty if the field is invalid

(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) abstract 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) open fun parsableTextFor(field: DateTimeField, style: TextStyle, locale: Locale): ParsableTextList

Get a list of all localized text in a particular style 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

style - the style of the text

locale - the locale

Return
the list of parsable text -- empty if the field is invalid

(jvm) abstract fun parsableTextFor(field: DateTimeField, styles: Set<TextStyle>, locale: Locale): 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