From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 56A6F431FAF for ; Mon, 17 Sep 2012 08:11:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ApE2JC8LAhaj for ; Mon, 17 Sep 2012 08:11:54 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 4C209431FAE for ; Mon, 17 Sep 2012 08:11:54 -0700 (PDT) Received: by wgbdq12 with SMTP id dq12so4638242wgb.2 for ; Mon, 17 Sep 2012 08:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:in-reply-to:organization:references :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version :content-type; bh=9JZgR5KWMu+JDXk9C9dRGCdglRSRMn92Cdy+SL57NdE=; b=dj6iEm1PYHPzyvOwKiBV4dS/ag/PB8BgS2YRUgD8/GdjodmfBw2ch8KSKIFsacjHvH iwNGO87XENuCIfOmZGtPlhV47HeXD69gKO22+JxHnFthhntN1pL+GT2GvWfwR0y1UCft u4UTMnMCh9Hx/4duFZsIGjwH+HtUUW8VlGA8Cl3ux94W8lpPw5Om0cxiKN1TEHrQf2eC PNgD2zWMQGvR7JYRDhhIodjMnoNYd5LlYBdPjRDKF4Axus4Pw3Mmy6GhdBAtKnuUvTJJ fhEyKxMkKVmq47xQdgXwb0TkXJa82AgXtkHZJWJymbkTXPqgaWxOJNZ5bzeSJ71bEKht pIsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:in-reply-to:organization:references :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version :content-type:x-gm-message-state; bh=9JZgR5KWMu+JDXk9C9dRGCdglRSRMn92Cdy+SL57NdE=; b=azsa+HsHLmZ7fgNhzEYVCvjaUMaCa744iYc2/71PRv24Alu/+UnX9TFHbEqWpg7ROT shkStfremEQWPU3eKWVSbGLwVjXp9GBZozYnCy6TW5G2+KvXHv/4SfVtbtmaofoW1Eev V01lSET0aFAGgWPJ8wEYQYq7fnAWMHnIQQzn09lS1GjBVmrQUS6LK6xe5dy5ES+V3EGp uhi+1ReOXHx493ApyUfxmqmUyWTK3f1JJ8+IXbICXUSe9aumxnBPIDuZiykSiP0n4nbU 1dZqOw72BK2inJsr+qtzFhsDVBQIrn8U5xslkYYoGz0KIUUVrPxivwNOd1yvaCmmV9us klcQ== Received: by 10.180.83.66 with SMTP id o2mr16786528wiy.14.1347894712979; Mon, 17 Sep 2012 08:11:52 -0700 (PDT) Received: by 10.180.83.66 with SMTP id o2mr16786502wiy.14.1347894712793; Mon, 17 Sep 2012 08:11:52 -0700 (PDT) Received: from mpn-glaptop ([172.28.91.186]) by mx.google.com with ESMTPS id eu4sm18211109wib.2.2012.09.17.08.11.50 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Sep 2012 08:11:51 -0700 (PDT) Sender: Michal Nazarewicz From: Michal Nazarewicz To: Jani Nikula , Tomi Ollila , notmuch@notmuchmail.org, David Bremner Subject: Re: [PATCH v3 6/9] lib: add date range query support In-Reply-To: <874nn2rqsn.fsf@nikula.org> Organization: http://mina86.com/ References: <532340d05ea748518c021048900bb83149e04e88.1347484177.git.jani@nikula.org> <874nn2rqsn.fsf@nikula.org> User-Agent: Notmuch/0.14+22~g8bdc16b (http://not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aFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 Date: Mon, 17 Sep 2012 17:11:45 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Gm-Message-State: ALoCoQn0qaSj+jTe8XKII9G1zdcuww1V2gbRvmBHUEdBl1FzgguIWKDCqsVbnkmj2KaB2EpMWE4X3WalkeWghdRePTyDVmZ7G27PQxwTTAYkKeXduCjBhrgrcLY1w6WrOgR65qi9W4bFVexRfub0lwjqJOUNfxLIvnKgIGWAaR5QFhmLe4ZIhAaK/4pGrtaUlVZ5mBE9HIHt X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 15:11:55 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 =E2=80=9Cyesterday=E2=80=9D has a duration of one day, than =E2=80=9Cdat= e:yesterday=E2=80=9D would be equivalent to =E2=80=9Cdate:yesterday..yesterday + 1 day=E2=80=9D 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. --=20 Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = (o o) ooo +------------------ooO--(_)--Ooo-- --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJQVz2xAAoJECBgQBJQdR/0oPUP/1HpXLdmVCrb2M1jxV8TlYRW KomL8E1+20Z+9L3ETW+T6jBFOGvS/vGOFD7DtmOLyscceY8eWC/6F2lBQ84OYkHM JnVkHQ3CPSisZTYt6pIidLxqEJQsZWXlzD1kJ040jFECyED+90nY2RoN55XBET3g 0buR08Gc0i1s+U5+aqAWqYX/aFgk7oPav6BJ2VYrdJ/qoUp4VMCux25euBY5qb4T TwGDsw8fMhoymdn9lNyioBUTd128g9mha1fkql5kf786ReOrQsl1DT3Pf9oibZrJ pJUvreUdzmvHNxudkspKtqgQSbrb/yKv645nWHmtuSB/A8OHGcYYznpQpXaegC3e maZlrp7GHBZvXsDVWhIwZvD4Mf93jNofrzuupGzxI4Hv2oZ+ty2XrT4UbpbReDmD AOZOGEf9k2c+nTY3W6HY102vK7MIcayqoUiqgtQvacXTmKzqxtlyvOT2t3j2RS9+ xdhH5HxP0A6dYRI5me4tEgsLbK+z7iihYjwni1ISaZF9iLDyjY73cBhc30wgIHcv VwN8NoG7KOGPYIyGt+EATSW62F9FFyhDv7xX4xXbPjkocV4auq8QYf2XOB8C438h M3ITgXlw3H3DXi1SWqCwp5hfT6e1LDbCF2htlLqEWxiXSwPUXwbv/bFb5SV9Tndl TjcGlqtOnXPfc14V8e3I =1n5o -----END PGP SIGNATURE----- --==-=-=-- --=-=-=--