java.lang.Object
org.eclipse.yasson.internal.JsonbDateFormatter
Formatter wrapper for different types of dates.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DateTimeFormatter
Default I-JSON date time formatter. -
Constructor Summary
ConstructorsConstructorDescriptionJsonbDateFormatter
(String format, String locale) Creates an instance with format string and locale.JsonbDateFormatter
(DateTimeFormatter dateTimeFormatter, String format, String locale) Creates an instance with cachedDateTimeFormatter
, format and locale. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Creates an instance with cached instance ofDateTimeFormatter
.static JsonbDateFormatter
Format string to be used either by formatter.Locale to use with formatter.int
hashCode()
boolean
toString()
-
Field Details
-
IJSON_DATE_FORMATTER
Default I-JSON date time formatter.
-
-
Constructor Details
-
JsonbDateFormatter
Creates an instance with cachedDateTimeFormatter
, format and locale.- Parameters:
dateTimeFormatter
- Reused time formatter.format
- Format in string.locale
- Locale in string.
-
JsonbDateFormatter
Creates an instance with format string and locale. Formatter will be created on every formatting / parsing operation.- Parameters:
format
- Formatter format.locale
- Locale in string.
-
-
Method Details
-
getDateTimeFormatter
Creates an instance with cached instance ofDateTimeFormatter
.- Returns:
- Formatter instance.
-
getFormat
Format string to be used either by formatter. Needed for formattingDate
withSimpleDateFormat
, which is not threadsafe.- Returns:
- Format.
-
getLocale
Locale to use with formatter.- Returns:
- Locale.
-
getDefault
-
isDefault
public boolean isDefault() -
equals
-
hashCode
public int hashCode() -
toString
-