DateTimeTextProvider

A provider to obtain the textual form of a date-time field.

@implSpec Implementations must be thread-safe. Implementations should cache the textual information.

@since 1.8

Constructors

this
this()
Undocumented in source.

Members

Functions

getText
string getText(TemporalField field, long value, TextStyle style, Locale locale)

Gets the text for the specified field, locale and style for the purpose of formatting. !(p) The text associated with the value is returned. The null return value should be used if there is no applicable text, or if the text would be a numeric representation of the value.

getText
string getText(Chronology chrono, TemporalField field, long value, TextStyle style, Locale locale)

Gets the text for the specified chrono, field, locale and style for the purpose of formatting. !(p) The text associated with the value is returned. The null return value should be used if there is no applicable text, or if the text would be a numeric representation of the value.

getTextIterator
Iterable!(MapEntry!(string, Long)) getTextIterator(TemporalField field, TextStyle style, Locale locale)

Gets an iterator of text to field for the specified field, locale and style for the purpose of parsing. !(p) The iterator must be returned _in order from the longest text to the shortest. !(p) The null return value should be used if there is no applicable parsable text, or if the text would be a numeric representation of the value. Text can only be parsed if all the values for that field-style-locale combination are unique.

getTextIterator
Iterable!(MapEntry!(string, Long)) getTextIterator(Chronology chrono, TemporalField field, TextStyle style, Locale locale)

Gets an iterator of text to field for the specified chrono, field, locale and style for the purpose of parsing. !(p) The iterator must be returned _in order from the longest text to the shortest. !(p) The null return value should be used if there is no applicable parsable text, or if the text would be a numeric representation of the value. Text can only be parsed if all the values for that field-style-locale combination are unique.

Static functions

INSTANCE
DateTimeTextProvider INSTANCE()

Cache.

getInstance
DateTimeTextProvider getInstance()

Gets the provider of text.

getLocalizedResource
T getLocalizedResource(string key, Locale locale)

Returns the localized resource of the given key and locale, or null if no localized resource is available.

Meta