def filterFieldAfter(self, query, clause, field, term, negated): if negated: raise BadQuery("Oops, can't use minus sign with AFTER in clause '%s' of search '%s'" % (clause, query)) try: # intervalStart=True to get start of specified interval # (inclusive after) utcDT = TimeUtils.stringToUtcDT(term, intervalStart=True) except ValueError, msg: raise BadQuery("Oops, %s in clause '%s' of search '%s'" % (msg, clause, query))
def filterFieldBefore(self, query, clause, field, term, negated): if negated: raise BadQuery("Oops, can't use minus sign with BEFORE in clause '%s' of search '%s'" % (clause, query)) try: # intervalStart=False to get end of specified interval # (inclusive before) utcDT = TimeUtils.stringToUtcDT(term, intervalStart=False) except ValueError, msg: raise BadQuery("Oops, %s in clause '%s' of search '%s'" % (msg, clause, query))