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

Michal Nazarewicz mina86 at mina86.com
Mon Sep 17 08:11:45 PDT 2012


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 at google.com>--------------ooO--(_)--Ooo--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120917/aa689057/attachment.pgp>


More information about the notmuch mailing list