Re: [PATCH v3 6/9] lib: add date range query support

Subject: Re: [PATCH v3 6/9] lib: add date range query support

Date: Mon, 17 Sep 2012 17:11:45 +0200

To: Jani Nikula, Tomi Ollila, notmuch@notmuchmail.org, David Bremner

Cc:

From: Michal Nazarewicz


On Thu, Sep 13 2012, Jani Nikula wrote:
> I find "since" rounding towards past and "until" rounding towards future
> a very simple rule. But YMMV.

To implement rounding, each date needs to have a period of time to align
to.  I call that a duration.  But if you have such a duration than
I propose a solution where you don't need any kind of rounding.

If “yesterday” has a duration of one day, than “date:yesterday” would be
equivalent to “date:yesterday..yesterday + 1 day” and this works
perfectly well with ranges open on the right side.  So to implement date
specifications with a single date, no additional code is really
required.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

Thread: