public interface FormatPatternProvider
This SPI-interface enables the access to localized gregorian
date-, time- or interval patterns according to the CLDR-specifiation and is instantiated via a
ServiceLoader-mechanism.
If there is no external FormatPatternProvider then Time4J will
just delegate to the JDK.
Specification: Implementations must have a public no-arg constructor.
ServiceLoader,
SimpleDateFormat.toPattern()| Modifier and Type | Method and Description |
|---|---|
default String |
getDatePattern(DisplayMode mode,
Locale locale)
Deprecated.
|
String |
getDatePattern(FormatStyle style,
Locale locale)
Returns the localized date pattern suitable for formatting of objects
of type
PlainDate. |
default String |
getDateTimePattern(DisplayMode dateMode,
DisplayMode timeMode,
Locale locale)
Deprecated.
|
String |
getDateTimePattern(FormatStyle dateStyle,
FormatStyle timeStyle,
Locale locale)
Returns the localized date-time pattern suitable for formatting of objects
of type
Moment or PlainTimestamp. |
String |
getIntervalPattern(Locale locale)
Returns the localized interval pattern.
|
default String |
getTimePattern(DisplayMode mode,
Locale locale)
Deprecated.
|
String |
getTimePattern(FormatStyle style,
Locale locale)
Returns the localized time pattern suitable for formatting of objects
of type
PlainTime. |
@Deprecated default String getDatePattern(DisplayMode mode, Locale locale)
getDatePattern(FormatStyle, Locale)Returns the localized date pattern suitable for formatting of objects
of type PlainDate.
mode - display modelocale - language and country settingPlainDate@Deprecated default String getTimePattern(DisplayMode mode, Locale locale)
getTimePattern(FormatStyle, Locale)Returns the localized time pattern suitable for formatting of objects
of type PlainTime.
mode - display modelocale - language and country settingPlainTime@Deprecated default String getDateTimePattern(DisplayMode dateMode, DisplayMode timeMode, Locale locale)
getDateTimePattern(FormatStyle, FormatStyle, Locale)Returns the localized date-time pattern suitable for formatting of objects
of type Moment or PlainTimestamp.
Expressions of the form "{0}" will be interpreted as the time component and expressions of the form "{1}" will be interpreted as the date component. All other chars of the pattern will be treated as literals.
dateMode - display mode of date parttimeMode - display mode of time partlocale - language and country settingMoment,
PlainTimestampString getDatePattern(FormatStyle style, Locale locale)
Returns the localized date pattern suitable for formatting of objects
of type PlainDate.
style - format stylelocale - language and country settingPlainDateString getTimePattern(FormatStyle style, Locale locale)
Returns the localized time pattern suitable for formatting of objects
of type PlainTime.
style - format stylelocale - language and country settingPlainTimeString getDateTimePattern(FormatStyle dateStyle, FormatStyle timeStyle, Locale locale)
Returns the localized date-time pattern suitable for formatting of objects
of type Moment or PlainTimestamp.
Expressions of the form "{0}" will be interpreted as the time component and expressions of the form "{1}" will be interpreted as the date component. All other chars of the pattern will be treated as literals.
dateStyle - format style of date parttimeStyle - format style of time partlocale - language and country settingMoment,
PlainTimestampString getIntervalPattern(Locale locale)
Returns the localized interval pattern.
Expressions of the form "{0}" will be interpreted as the start boundary format and expressions of the form "{1}" will be interpreted as the end boundary format. All other chars of the pattern will be treated as literals.
locale - language and country settingCopyright © 2014–2021. All rights reserved.