From 000805ae1fad51b243a15e3fbee2e8606f68115d Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 22 May 2011 10:26:20 +0300 Subject: [PATCH] * mu-query: special-case 'now' and 'today' when used as start of range --- src/mu-query.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mu-query.cc b/src/mu-query.cc index 4f3212d8..341a39d0 100644 --- a/src/mu-query.cc +++ b/src/mu-query.cc @@ -45,6 +45,11 @@ public: if (!clear_prefix (begin)) return Xapian::BAD_VALUENO; + + // now and begin should only appear at the end, so + // correct them... + if (begin == "today" || begin == "now") + std::swap (begin, end); substitute_date (begin); substitute_date (end);