Constructor and Description |
---|
DateTimeFormat()
Creates object that enable language sensitive date time formatting, using the default locale.
|
DateTimeFormat(CLocale locale)
Creates object that enable language sensitive date time formatting, using the locale options.
|
DateTimeFormat(CLocale locale,
DateTimeFormatOptions options)
Creates object that enables language sensitive date time formatting, using the locale options and specific options.
|
Modifier and Type | Method and Description |
---|---|
String |
format(T value)
Formats a value according to the locale and formatting options of this object.
|
List<FormatPart> |
formatToParts(T value)
Returns an array of objects containing the locale-specific tokens from which it possible to build custom strings while preserving the locale-specific parts.
It is useful for custom formatting of value strings. |
CLocale |
getLocale()
Returns the locale which has initialized the format.
|
R |
resolvedOptions()
Returns a new object with properties reflecting the locale and value formatting options computed during initialization of this object.
|
public DateTimeFormat()
public DateTimeFormat(CLocale locale)
locale
- a locale instancepublic DateTimeFormat(CLocale locale, DateTimeFormatOptions options)
locale
- a locale instanceoptions
- options to configure the date time formatpublic final CLocale getLocale()
public final String format(T value)
value
- the vale to formatpublic final R resolvedOptions()
public final List<FormatPart> formatToParts(T value)
value
- value to format