Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 54FE4431E84 for ; Tue, 25 Sep 2012 05:23:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 NxzUVKMTKEyJ for ; Tue, 25 Sep 2012 05:23:27 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id A5CD7429E34 for ; Tue, 25 Sep 2012 05:23:15 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 2C2CC3CFF59; Tue, 25 Sep 2012 14:22:26 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id vXk216IIFgjI; Tue, 25 Sep 2012 14:22:17 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 5ADCA19F33A8; Tue, 25 Sep 2012 14:16:01 +0200 (CEST) Received: from steelpick.2x.cz (unknown [213.29.198.144]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 1E1E8660968; Tue, 25 Sep 2012 14:15:52 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.80) (envelope-from ) id 1TGU3G-0001g5-Mu; Tue, 25 Sep 2012 14:15:46 +0200 From: Michal Sojka To: Michal Nazarewicz , Jani Nikula , notmuch@notmuchmail.org, David Bremner Subject: Re: [PATCH v3 6/9] lib: add date range query support In-Reply-To: References: <532340d05ea748518c021048900bb83149e04e88.1347484177.git.jani@nikula.org> User-Agent: Notmuch/0.14+23~g9d68aca (http://notmuchmail.org) Emacs/24.2.1 (x86_64-pc-linux-gnu) Date: Tue, 25 Sep 2012 14:15:46 +0200 Message-ID: <87wqzi1eod.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain 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: Tue, 25 Sep 2012 12:23:29 -0000 On Thu, Sep 13 2012, Michal Nazarewicz wrote: > On Wed, Sep 12 2012, Jani Nikula wrote: >> Add a custom value range processor to enable date and time searches of >> the form date:since..until, where "since" and "until" are expressions >> understood by the previously added date/time parser, to restrict the >> results to messages within a particular time range (based on the Date: >> header). >> >> If "since" or "until" describes date/time at an accuracy of days or >> less, the values are rounded according to the accuracy, towards past >> for "since" and towards future for "until". For example, >> date:november..yesterday would match from the beginning of November >> until the end of yesterday. Expressions such as date:today..today >> means since the beginning of today until the end of today. > > IMO this is totally unintuitive and not how the range should work. > date:foo..bar should return messages whose date >= foo and < bar. So > for instance date:november..yesterday should return messages whose date > is > 2012/11/01 00:00:00 and < 2012/09/12 00:00:00. So to get > yesterdays messages one would do: date:yesterday..today. For me, date:monday..wednesday means all messages received on monday, tuseday or wednesday. If I say Wednesday, I'm really interested in Wednesday and not the day before Wednesday. I'd also like to allow syntax like date:yesterday with the meaning all messages sent yesterday. My idea how to implement this was described in id:"87bovryqp0.fsf@steelpick.2x.cz". Unfortunately, I have no time to implement it myself. -Michal