public abstract class DateTimeFormatterProvider
extends java.util.spi.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,
java.util.Locale locale,
Chronology chronology)
Gets a localized date, time or date-time format.
|
public abstract DateTimeFormatter getFormatter(DateTimeFormatterBuilder.FormatStyle dateStyle, DateTimeFormatterBuilder.FormatStyle timeStyle, java.util.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 nulljava.lang.IllegalArgumentException
- if both format styles are nulljava.lang.IllegalArgumentException
- if the locale is not a recognized locale