java.text.spi
public abstract class DateFormatProvider extends LocaleServiceProvider
Since: 1.6
Constructor Summary | |
---|---|
protected | DateFormatProvider()
Constructs a new DateFormatProvider.
|
Method Summary | |
---|---|
abstract DateFormat | getDateInstance(int style, Locale locale)
Returns a java.text.DateFormat instance
for formatting dates with the given style in the specified
java.util.Locale.
|
abstract DateFormat | getDateTimeInstance(int dateStyle, int timeStyle, Locale locale)
Returns a java.text.DateFormat instance
for formatting dates and times with the given style in the
specified java.util.Locale.
|
abstract DateFormat | getTimeInstance(int style, Locale locale)
Returns a java.text.DateFormat instance
for formatting times with the given style in the specified
java.util.Locale.
|
Parameters: style the formatting style; one of DateFormat#SHORT, DateFormat#MEDIUM, DateFormat#LONG or DateFormat#FULL. locale the desired locale.
Returns: the localized instance for formatting dates.
Throws: NullPointerException if the locale is null. IllegalArgumentException if the style is invalid or
the locale is not one
returned by
getAvailableLocales()
See Also: java.text.DateFormat#getDateInstance(int,java.util.Locale)
Parameters: dateStyle the date formatting style; one of DateFormat#SHORT, DateFormat#MEDIUM, DateFormat#LONG or DateFormat#FULL. timeStyle the time formatting style; one of DateFormat#SHORT, DateFormat#MEDIUM, DateFormat#LONG or DateFormat#FULL. locale the desired locale.
Returns: the localized instance for formatting dates.
Throws: NullPointerException if the locale is null. IllegalArgumentException if either style is invalid or
the locale is not one
returned by
getAvailableLocales()
See Also: java.text.DateFormat#getDateInstance(java.util.Locale)
Parameters: style the formatting style; one of DateFormat#SHORT, DateFormat#MEDIUM, DateFormat#LONG or DateFormat#FULL. locale the desired locale.
Returns: the localized instance for formatting times.
Throws: NullPointerException if the locale is null. IllegalArgumentException if the style is invalid or
the locale is not one
returned by
getAvailableLocales()
See Also: java.text.DateFormat#getTimeInstance(int,java.util.Locale)