Package com.ibm.icu.message2
Class DateTimeFormatterFactory
java.lang.Object
com.ibm.icu.message2.DateTimeFormatterFactory
- All Implemented Interfaces:
FormatterFactory
Creates a
Formatter doing formatting of date / time, similar to
{exp, date} and {exp, time} in MessageFormat.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFormatter(Locale locale, Map<String, Object> fixedOptions) The method that is called to create a formatter.private static StringgetDateFieldOptions(Map<String, Object> options) private static intgetDateTimeStyle(Map<String, Object> options, String key) private static StringgetTimeFieldOptions(Map<String, Object> options) private static ObjectparseIso8601(String text) private static Integerprivate static intstringToStyle(String option)
-
Field Details
-
kind
-
ISO_PATTERN
-
-
Constructor Details
-
DateTimeFormatterFactory
DateTimeFormatterFactory(String kind)
-
-
Method Details
-
stringToStyle
-
createFormatter
The method that is called to create a formatter.- Specified by:
createFormatterin interfaceFormatterFactory- Parameters:
locale- the locale to use for formatting.fixedOptions- the options to use for formatting. The keys and values are function dependent.- Returns:
- the formatter.
- Throws:
IllegalArgumentException- when something goes wrong (for example conflicting options, invalid option values, etc.)
-
getDateTimeStyle
-
getDateFieldOptions
-
getTimeFieldOptions
-
safeParse
-
parseIso8601
-