Class DateMathParser

  • Direct Known Subclasses:
    DateMathParser

    public class DateMathParser
    extends ValueParser<Date>
    Parses date math expressions into Date objects, using ApacheSolrDataMathParser.

    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
     
    See ApacheSolrDataMathParser for more details.
    Author:
    niall.gallagher
    • Constructor Detail

      • DateMathParser

        public DateMathParser()
      • DateMathParser

        public DateMathParser​(Date now)
      • DateMathParser

        public DateMathParser​(TimeZone timeZone,
                              Locale locale)