Fixed #36: -e wasn't parsing the passed in date correctly.

This commit is contained in:
John Wiegley 2008-04-04 18:30:36 +00:00
parent 513fbd8b15
commit 925597a0ff

View file

@ -482,17 +482,17 @@ OPT_BEGIN(begin, "b:") {
OPT_BEGIN(end, "e:") {
char buf[128];
interval_t interval(optarg);
if (! interval.end)
if (! interval.begin)
throw new error(std::string("Could not determine end of period '") +
optarg + "'");
if (! report->predicate.empty())
report->predicate += "&";
report->predicate += "d<[";
report->predicate += interval.end.to_string();
report->predicate += interval.begin.to_string();
report->predicate += "]";
terminus = interval.end;
terminus = interval.begin;
} OPT_END(end);
OPT_BEGIN(current, "c") {