#include <queryparser.h>
Inheritance diagram for Xapian::DateValueRangeProcessor:
Public Member Functions | |
DateValueRangeProcessor (Xapian::valueno valno_, bool prefer_mdy_=false, int epoch_year_=1970) | |
Constructor. | |
Xapian::valueno | operator() (std::string &begin, std::string &end) |
See if <begin>. | |
Private Attributes | |
Xapian::valueno | valno |
bool | prefer_mdy |
int | epoch_year |
Begin and end must be dates in a recognised format.
Definition at line 125 of file queryparser.h.
Xapian::DateValueRangeProcessor::DateValueRangeProcessor | ( | Xapian::valueno | valno_, | |
bool | prefer_mdy_ = false , |
|||
int | epoch_year_ = 1970 | |||
) | [inline] |
Constructor.
valno_ | The value number to return from operator(). | |
prefer_mdy_ | Should ambiguous dates be interpreted as month/day/year rather than day/month/year? (default: false) | |
epoch_year_ | Year to use as the epoch for dates with 2 digit years (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). |
Definition at line 141 of file queryparser.h.
Xapian::valueno Xapian::DateValueRangeProcessor::operator() | ( | std::string & | begin, | |
std::string & | end | |||
) | [virtual] |
See if <begin>.
.<end> is a valid date value range.
If <begin>..<end> is a sensible date range, this method returns the value number of range filter on. Otherwise it returns Xapian::BAD_VALUENO.
Implements Xapian::ValueRangeProcessor.
Definition at line 126 of file queryparser.h.
bool Xapian::DateValueRangeProcessor::prefer_mdy [private] |
Definition at line 127 of file queryparser.h.
int Xapian::DateValueRangeProcessor::epoch_year [private] |
Definition at line 128 of file queryparser.h.