Enum Class DateFormat
- All Implemented Interfaces:
Serializable
,Comparable<DateFormat>
,Constable
Values based on Elasticsearch reference
documentation. The patterns are taken from this documentation and slightly adapted so that a Java
DateTimeFormatter
produces the same values as the Elasticsearch formatter. Use
format = {}
to disable built-in date formats in the Field
annotation. If you want to use only a
custom date format pattern, you must set the format
property to empty {}
.- Author:
- Jakub Vavrik, Tim te Beek, Peter-Josef Meisch, Sascha Woo
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic DateFormat
Returns the enum constant of this class with the specified name.static DateFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
basic_date
-
basic_date_time
-
basic_date_time_no_millis
-
basic_ordinal_date
-
basic_ordinal_date_time
-
basic_ordinal_date_time_no_millis
-
basic_time
-
basic_time_no_millis
-
basic_t_time
-
basic_t_time_no_millis
-
basic_week_date
-
basic_week_date_time
-
basic_week_date_time_no_millis
-
date
-
date_hour
-
date_hour_minute
-
date_hour_minute_second
-
date_hour_minute_second_fraction
-
date_hour_minute_second_millis
-
date_optional_time
-
date_time
-
date_time_no_millis
-
epoch_millis
-
epoch_second
-
hour
-
hour_minute
-
hour_minute_second
-
hour_minute_second_fraction
-
hour_minute_second_millis
-
ordinal_date
-
ordinal_date_time
-
ordinal_date_time_no_millis
-
time
-
time_no_millis
-
t_time
-
t_time_no_millis
-
week_date
-
week_date_time
-
week_date_time_no_millis
-
weekyear
-
weekyear_week
-
weekyear_week_day
-
year
-
year_month
-
year_month_day
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getPattern
- Since:
- 4.2
-