public abstract class DateTimeFormatterProvider extends LocaleServiceProvider
DateTimeFormatterProvider is an abstract class and must be implemented with care. Implementations must be thread-safe. It is strongly recommended that implementations cache the returned formatters.
| Constructor and Description |
|---|
DateTimeFormatterProvider() |
| Modifier and Type | Method and Description |
|---|---|
abstract DateTimeFormatter |
getFormatter(DateTimeFormatterBuilder.FormatStyle dateStyle,
DateTimeFormatterBuilder.FormatStyle timeStyle,
Locale locale,
Chronology chronology)
Gets a localized date, time or date-time format.
|
getAvailableLocales, isSupportedLocalepublic abstract DateTimeFormatter getFormatter(DateTimeFormatterBuilder.FormatStyle dateStyle, DateTimeFormatterBuilder.FormatStyle timeStyle, Locale locale, Chronology chronology)
dateStyle - the date formatter style to obtain, null to obtain a time formattertimeStyle - the time formatter style to obtain, null to obtain a date formatterlocale - the locale to use, not nullchronology - the chronology to use, not nullIllegalArgumentException - if both format styles are nullIllegalArgumentException - if the locale is not a recognized localeCopyright © 2024. All rights reserved.