public abstract class DateFormatProvider extends LocaleServiceProvider
DateFormat
.
Note that Android does not support user-supplied locale service providers.
Modifier | Constructor and Description |
---|---|
protected |
DateFormatProvider()
Default constructor, for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
abstract DateFormat |
getDateInstance(int style,
Locale locale)
Returns an instance of
DateFormat that formats dates
in the given style for the given locale. |
abstract DateFormat |
getDateTimeInstance(int dateStyle,
int timeStyle,
Locale locale)
Returns an instance of
DateFormat that formats dates and times
in the given style for the given locale. |
abstract DateFormat |
getTimeInstance(int style,
Locale locale)
Returns an instance of
DateFormat that formats times
in the given style for the given locale. |
getAvailableLocales
protected DateFormatProvider()
public abstract DateFormat getTimeInstance(int style, Locale locale)
DateFormat
that formats times
in the given style for the given locale.style
- the given time formatting style.locale
- the localeDateFormat
NullPointerException
- if locale == null
IllegalArgumentException
- if locale isn't one of the locales returned from
getAvailableLocales().public abstract DateFormat getDateInstance(int style, Locale locale)
DateFormat
that formats dates
in the given style for the given locale.style
- the given date formatting style.locale
- the localeDateFormat
NullPointerException
- if locale == null
IllegalArgumentException
- if locale isn't one of the locales returned from
getAvailableLocales().public abstract DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale)
DateFormat
that formats dates and times
in the given style for the given locale.dateStyle
- the given date formatting style.timeStyle
- the given time formatting style.locale
- the localeDateFormat
NullPointerException
- if locale == null
IllegalArgumentException
- if locale isn't one of the locales returned from
getAvailableLocales().