Class RelativeDateRangePredicateEvaluator

  • All Implemented Interfaces:
    PredicateEvaluator

    public class RelativeDateRangePredicateEvaluator
    extends DateRangePredicateEvaluator
    Matches JCR DATE properties against a date/time interval using time offsets relative to the current server time. You can specify lowerBound and upperBound using either a millisecond value or the bugzilla syntax 1s 2m 3h 4d 5w 6M 7y (one second, two minutes, three hours, four days, five weeks, six months, seven years). Prefix with "-" to indicate a negative offset before the current time. If you only specify lowerBound or upperBound, the other one will default to 0, meaning the current time.

    For example:

    • upperBound=1h (and no lowerBound) would select anything in the next hour
    • lowerBound=-1d (and no upperBound) would select anything in the last 24 hours
    • lowerBound=-6M and upperBound=-3M would select anything 6 months to 3 months old
    • lowerBound=-1500 and upperBound=5500 would select anything between 1500 milliseconds in the past and 5500 milliseconds in the future
    • lowerBound=1d and upperBound=2d would select anything in the day after tomorrow

    Note it does not take leap years into consideration and all months are 30 days.

    Does not support filtering.

    Supports facet extraction in the same way as the DateRangePredicateEvaluator.

    Name:

    relativedaterange

    Properties:

    upperBound
    upper date bound in milliseconds or 1s 2m 3h 4d 5w 6M 7y (one second, two minutes, three hours, four days, five weeks, six months, seven years) relative to current server time, use "-" for negative offset
    lowerBound
    lower date bound in milliseconds or 1s 2m 3h 4d 5w 6M 7y (one second, two minutes, three hours, four days, five weeks, six months, seven years) relative to current server time, use "-" for negative offset
    • Constructor Detail

      • RelativeDateRangePredicateEvaluator

        public RelativeDateRangePredicateEvaluator()