public interface DateMathParser
| Modifier and Type | Method and Description |
|---|---|
default long |
parse(String text,
LongSupplier now)
Parse a date math expression without timzeone info and rounding down.
|
default long |
parse(String text,
LongSupplier now,
boolean roundUp,
org.joda.time.DateTimeZone tz)
Deprecated.
|
long |
parse(String text,
LongSupplier now,
boolean roundUp,
ZoneId tz)
Parse text, that potentially contains date math into the milliseconds since the epoch
|
default long parse(String text, LongSupplier now) throws ElasticsearchParseException
ElasticsearchParseException@Deprecated default long parse(String text, LongSupplier now, boolean roundUp, org.joda.time.DateTimeZone tz) throws ElasticsearchParseException
ElasticsearchParseExceptionlong parse(String text, LongSupplier now, boolean roundUp, ZoneId tz) throws ElasticsearchParseException
Examples are
2014-11-18||-2y subtracts two years from the input date
now/m rounds the current time to minute granularity
Supported rounding units are y year M month w week (beginning on a monday) d day h/H hour m minute s second
text - the inputnow - a supplier to retrieve the current date in milliseconds, if needed for additionsroundUp - should the result be rounded uptz - an optional timezone that should be applied before returning the milliseconds since the epochElasticsearchParseExceptionCopyright © 2023. All rights reserved.