1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 2518D431FBD
\r
6 for <notmuch@notmuchmail.org>; Sun, 21 Oct 2012 14:23:03 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id KtUkBwgc6+iN for <notmuch@notmuchmail.org>;
\r
17 Sun, 21 Oct 2012 14:23:01 -0700 (PDT)
\r
18 Received: from mail-la0-f53.google.com (mail-la0-f53.google.com
\r
19 [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 29D69431FB6
\r
22 for <notmuch@notmuchmail.org>; Sun, 21 Oct 2012 14:23:01 -0700 (PDT)
\r
23 Received: by mail-la0-f53.google.com with SMTP id l5so1455559lah.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 21 Oct 2012 14:23:00 -0700 (PDT)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=google.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
\r
28 :in-reply-to:references:x-gm-message-state;
\r
29 bh=FU5wqKqkyR2So/wF3Gs/T+cnxMfYMmXboqend1CP+Y4=;
\r
30 b=dNinTAE3sSws/fTnfjCT4gNI3MENBeGnHpJxbaVLBrAjH0MVVk55qlIvxW/5cQ7rKi
\r
31 K0h4bs36X29zjv3R7/w8LzPQmGZ+zAu3C1jtoFtQsl4Q5XksfLTArtNNUZ4e5D62J/lB
\r
32 Scwt4HxMo9JhQjifkSJH4GfzclRZaZ7iviK2MCg3sExIhlzPMlN1urncKra2Sy0bb7wH
\r
33 5bP6atg7V6lFqklnsLL1+J30U8uNv8VoBXjGqKplKT9Hi2lFiheekNAh42T93+Z/ngKi
\r
34 o3HuzWOh3DUmI0zhrd6eQQtXljsrJlgmKRgCgfExbJ1s3qn3IPEmRzKk2dsdXi7hDNqj
\r
36 Received: by 10.152.106.171 with SMTP id gv11mr6566408lab.26.1350854580781;
\r
37 Sun, 21 Oct 2012 14:23:00 -0700 (PDT)
\r
38 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.
\r
40 by mx.google.com with ESMTPS id f2sm1365814lbz.6.2012.10.21.14.22.59
\r
41 (version=SSLv3 cipher=OTHER); Sun, 21 Oct 2012 14:22:59 -0700 (PDT)
\r
42 From: Jani Nikula <jani@nikula.org>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v5 8/9] man: document the date:since..until range queries
\r
45 Date: Mon, 22 Oct 2012 00:22:31 +0300
\r
47 <cff9c1dd87b8bc11326dca0b3589c81656500f5e.1350854171.git.jani@nikula.org>
\r
48 X-Mailer: git-send-email 1.7.10.4
\r
49 In-Reply-To: <cover.1350854171.git.jani@nikula.org>
\r
50 References: <cover.1350854171.git.jani@nikula.org>
\r
51 In-Reply-To: <cover.1350854171.git.jani@nikula.org>
\r
52 References: <cover.1350854171.git.jani@nikula.org>
\r
54 ALoCoQleNuvYCshIrocshvM/MT+0Fw/ooXUFLD2W657TbnwkpUvucfYokGa3vdNjz3MSgdWwbCif
\r
55 X-BeenThere: notmuch@notmuchmail.org
\r
56 X-Mailman-Version: 2.1.13
\r
58 List-Id: "Use and development of the notmuch mail system."
\r
59 <notmuch.notmuchmail.org>
\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
63 List-Post: <mailto:notmuch@notmuchmail.org>
\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
67 X-List-Received-Date: Sun, 21 Oct 2012 21:23:03 -0000
\r
70 man/man7/notmuch-search-terms.7 | 147 +++++++++++++++++++++++++++++++++++----
\r
71 1 file changed, 135 insertions(+), 12 deletions(-)
\r
73 diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7
\r
74 index 17a109e..fbd3ee7 100644
\r
75 --- a/man/man7/notmuch-search-terms.7
\r
76 +++ b/man/man7/notmuch-search-terms.7
\r
77 @@ -54,6 +54,8 @@ terms to match against specific portions of an email, (where
\r
79 folder:<directory-path>
\r
81 + date:<since>..<until>
\r
85 prefix is used to match the name or address of the sender of an email
\r
86 @@ -104,6 +106,26 @@ contained within particular directories within the mail store. Only
\r
87 the directory components below the top-level mail database path are
\r
88 available to be searched.
\r
92 +prefix can be used to restrict the results to only messages within a
\r
93 +particular time range (based on the Date: header) with a range syntax
\r
96 + date:<since>..<until>
\r
98 +See \fBDATE AND TIME SEARCH\fR below for details on the range
\r
99 +expression, and supported syntax for <since> and <until> date and time
\r
102 +The time range can also be specified using timestamps with a syntax
\r
105 + <initial-timestamp>..<final-timestamp>
\r
107 +Each timestamp is a number representing the number of seconds since
\r
108 +1970\-01\-01 00:00:00 UTC.
\r
110 In addition to individual terms, multiple terms can be
\r
111 combined with Boolean operators (
\r
112 .BR and ", " or ", " not
\r
113 @@ -117,20 +139,121 @@ operators, but will have to be protected from interpretation by the
\r
114 shell, (such as by putting quotation marks around any parenthesized
\r
117 -Finally, results can be restricted to only messages within a
\r
118 -particular time range, (based on the Date: header) with a syntax of:
\r
119 +.SH DATE AND TIME SEARCH
\r
121 - <initial-timestamp>..<final-timestamp>
\r
122 +This is a non-exhaustive description of the date and time search with
\r
123 +some pseudo notation. Most of the constructs can be mixed freely, and
\r
124 +in any order, but the same absolute date or time can't be expressed
\r
127 -Each timestamp is a number representing the number of seconds since
\r
128 -1970\-01\-01 00:00:00 UTC. This is not the most convenient means of
\r
129 -expressing date ranges, but until notmuch is fixed to accept a more
\r
130 -convenient form, one can use the date program to construct
\r
131 -timestamps. For example, with the bash shell the following syntax would
\r
132 -specify a date range to return messages from 2009\-10\-01 until the
\r
135 - $(date +%s \-d 2009\-10\-01)..$(date +%s)
\r
138 +.B The range expression
\r
140 +date:<since>..<until>
\r
142 +The above expression restricts the results to only messages from
\r
143 +<since> to <until>, based on the Date: header.
\r
145 +If <since> or <until> describes time at an accuracy of days or less,
\r
146 +the date/time is rounded, towards past for <since> and towards future
\r
147 +for <until>, to be inclusive. For example, date:january..february
\r
148 +matches from the beginning of January until the end of
\r
149 +February. Similarly, date:yesterday..yesterday matches from the
\r
150 +beginning of yesterday until the end of yesterday.
\r
152 +Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's
\r
153 +possible to specify date:..<until> or date:<since>.. to not limit the
\r
154 +start or end time, respectively. Unfortunately, pre-1.2.1 Xapian does
\r
155 +not report an error on open ended ranges, but it does not work as
\r
158 +Xapian does not support spaces in range expressions. You can replace
\r
159 +the spaces with '_', or (in most cases) '-', or (in some cases) leave
\r
160 +the spaces out altogether.
\r
162 +Entering date:expr without ".." (for example date:yesterday) won't
\r
163 +work, as it's not interpreted as a range expression at all. You can
\r
164 +achieve the expected result by duplicating the expr both sides of ".."
\r
165 +(for example date:yesterday..yesterday).
\r
170 +.B Relative date and time
\r
171 +[N|number] (years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs) [...]
\r
173 +All refer to past, can be repeated and will be accumulated.
\r
175 +Units can be abbreviated to any length, with the otherwise ambiguous
\r
176 +single m being m for minutes and M for months.
\r
178 +Number multiplier can also be written out one, two, ..., ten, dozen,
\r
179 +hundred. As special cases last means one ("last week") and this means
\r
180 +zero ("this month").
\r
182 +When combined with absolute date and time, the relative date and time
\r
183 +specification will be relative from the specified absolute date and
\r
186 +Examples: 5M2d, two weeks
\r
191 +.B Supported time formats
\r
192 +H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]
\r
194 +H[H] (am|a.m.|pm|p.m.)
\r
204 +Examples: 17:05, 5pm
\r
209 +.B Supported date formats
\r
216 +M[M]/D[D][/[YY]YY]
\r
220 +D[D].M[M][.[YY]YY]
\r
222 +D[D][(st|nd|rd|th)] Mon[thname] [YYYY]
\r
224 +Mon[thname] D[D][(st|nd|rd|th)] [YYYY]
\r
228 +Month names can be abbreviated at three or more characters.
\r
230 +Weekday names can be abbreviated at three or more characters.
\r
232 +Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3
\r
242 +Some time zone codes, e.g. UTC, EET.
\r