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 |
|---|---|
String |
getDatePattern(DisplayMode mode,
Locale locale)
Returns the localized date pattern suitable for formatting of objects
of type
PlainDate. |
String |
getDateTimePattern(DisplayMode dateMode,
DisplayMode timeMode,
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.
|
String |
getTimePattern(DisplayMode mode,
Locale locale)
Returns the localized time pattern suitable for formatting of objects
of type
PlainTime. |
String getDatePattern(DisplayMode mode, Locale locale)
Returns the localized date pattern suitable for formatting of objects
of type PlainDate.
mode - display modelocale - language and country settingPlainDateString getTimePattern(DisplayMode mode, Locale locale)
Returns the localized time pattern suitable for formatting of objects
of type PlainTime.
mode - display modelocale - language and country settingPlainTimeString getDateTimePattern(DisplayMode dateMode, DisplayMode timeMode, 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.
dateMode - display mode of date parttimeMode - display mode 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–2017. All rights reserved.