Module org.elasticsearch.xcore
Class WatcherDateTimeUtils
java.lang.Object
org.elasticsearch.xpack.core.watcher.support.WatcherDateTimeUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ZonedDateTimeconvertToDate(Object value, Clock clock) static StringformatDate(ZonedDateTime date) static ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimeparseDateMath(String valueString, ZoneId timeZone, Clock clock) static ZonedDateTimeparseDateMath(String fieldName, org.elasticsearch.xcontent.XContentParser parser, ZoneId timeZone, Clock clock) static ZonedDateTimeparseDateMathOrNull(String fieldName, org.elasticsearch.xcontent.XContentParser parser, ZoneId timeZone, Clock clock) static org.elasticsearch.core.TimeValueparseTimeValue(org.elasticsearch.xcontent.XContentParser parser, String settingName) static org.elasticsearch.core.TimeValueparseTimeValueSupportingFractional(String sValue, String settingName) Parse aTimeValuewith support for fractional values.static ZonedDateTimestatic org.elasticsearch.xcontent.XContentBuilderwriteDate(String fieldName, org.elasticsearch.xcontent.XContentBuilder builder, ZonedDateTime date) static voidwriteDate(StreamOutput out, ZonedDateTime date) static voidwriteOptionalDate(StreamOutput out, ZonedDateTime date)
-
Field Details
-
dateTimeFormatter
-
dateMathParser
-
-
Method Details
-
convertToDate
-
parseDate
-
parseDate
-
formatDate
-
parseDateMath
public static ZonedDateTime parseDateMath(String fieldName, org.elasticsearch.xcontent.XContentParser parser, ZoneId timeZone, Clock clock) throws IOException - Throws:
IOException
-
parseDateMathOrNull
public static ZonedDateTime parseDateMathOrNull(String fieldName, org.elasticsearch.xcontent.XContentParser parser, ZoneId timeZone, Clock clock) throws IOException - Throws:
IOException
-
parseDateMath
-
parseDate
public static ZonedDateTime parseDate(String fieldName, org.elasticsearch.xcontent.XContentParser parser, ZoneId timeZone) throws IOException - Throws:
IOException
-
writeDate
public static org.elasticsearch.xcontent.XContentBuilder writeDate(String fieldName, org.elasticsearch.xcontent.XContentBuilder builder, ZonedDateTime date) throws IOException - Throws:
IOException
-
writeDate
- Throws:
IOException
-
writeOptionalDate
- Throws:
IOException
-
readOptionalDate
- Throws:
IOException
-
parseTimeValue
public static org.elasticsearch.core.TimeValue parseTimeValue(org.elasticsearch.xcontent.XContentParser parser, String settingName) throws IOException - Throws:
IOException
-
parseTimeValueSupportingFractional
public static org.elasticsearch.core.TimeValue parseTimeValueSupportingFractional(@Nullable String sValue, String settingName) Parse aTimeValuewith support for fractional values.
-