Class DateMathParser
- java.lang.Object
-
- com.googlecode.cqengine.query.parser.common.ValueParser<Date>
-
- com.googlecode.cqengine.query.parser.cqn.support.DateMathParser
-
- Direct Known Subclasses:
DateMathParser
public class DateMathParser extends ValueParser<Date>
Parses date math expressions intoDate
objects, usingApacheSolrDataMathParser
. Examples:/HOUR ... Round to the start of the current hour /DAY ... Round to the start of the current day +2YEARS ... Exactly two years in the future from now -1DAY ... Exactly 1 day prior to now /DAY+6MONTHS+3DAYS ... 6 months and 3 days in the future from the start of the current day +6MONTHS+3DAYS/DAY ... 6 months and 3 days in the future from now, rounded down to nearest day
SeeApacheSolrDataMathParser
for more details.- Author:
- niall.gallagher
-
-
Constructor Summary
Constructors Constructor Description DateMathParser()
DateMathParser(Date now)
DateMathParser(TimeZone timeZone, Locale locale)
DateMathParser(TimeZone timeZone, Locale locale, Date now)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Date
parse(Class<? extends Date> valueType, String stringValue)
protected String
stripQuotes(String stringValue)
-
Methods inherited from class com.googlecode.cqengine.query.parser.common.ValueParser
validatedParse
-
-