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 C2C71431FBC
\r
6 for <notmuch@notmuchmail.org>; Fri, 3 Aug 2012 14:52:18 -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 EW12lOkeVkzU for <notmuch@notmuchmail.org>;
\r
17 Fri, 3 Aug 2012 14:52:17 -0700 (PDT)
\r
18 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
19 [209.85.217.181]) (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 800F1431FAF
\r
22 for <notmuch@notmuchmail.org>; Fri, 3 Aug 2012 14:52:17 -0700 (PDT)
\r
23 Received: by mail-lb0-f181.google.com with SMTP id gk1so621084lbb.26
\r
24 for <notmuch@notmuchmail.org>; Fri, 03 Aug 2012 14:52:17 -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=NUGsySKvm0TnO8zgeEd8pi58+RaZGhVr/lYk5zIcaoY=;
\r
30 b=XEZhIRE38zSakrVrPjcwqOVRnyuSEX81vqpn+d82HorVXR0uD/2eGixBxhYNzdB7um
\r
31 vc79LoRMh+0Hxn+wpuCS6BrnZjITsGV8kwLb9rLy0imcQWv4txQT0CuzgS8sEe913yjF
\r
32 sLuazggK9XpOTQI59GBY9ztprkwBg4gMeKJ2X9QmXBgvaf8flc8mqy98y/AKZp+2IO+t
\r
33 OjbdRdyYebHpzDrMHgWMLER3G4QcuKHfJEjyyokUeFGG3O3LheJQNaGbM47rYDvTJ4uW
\r
34 aFLf9ei95oO18QTTF8aouKdk1AssfsUc1zqc25+3Q2Ed7d/JxUtGbkcGq6ufw0Yi0sBa
\r
36 Received: by 10.152.147.33 with SMTP id th1mr2965387lab.9.1344030737137;
\r
37 Fri, 03 Aug 2012 14:52:17 -0700 (PDT)
\r
38 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.
\r
40 by mx.google.com with ESMTPS id ta2sm9724207lab.15.2012.08.03.14.52.15
\r
41 (version=SSLv3 cipher=OTHER); Fri, 03 Aug 2012 14:52:16 -0700 (PDT)
\r
42 From: Jani Nikula <jani@nikula.org>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH 7/7] man: document the date:since..until range queries
\r
45 Date: Sat, 4 Aug 2012 00:51:52 +0300
\r
47 <58bb71a942adf8ee2df614b06786a19db9600d6b.1344028781.git.jani@nikula.org>
\r
48 X-Mailer: git-send-email 1.7.9.5
\r
49 In-Reply-To: <cover.1344028781.git.jani@nikula.org>
\r
50 References: <cover.1344028781.git.jani@nikula.org>
\r
51 In-Reply-To: <cover.1344028781.git.jani@nikula.org>
\r
52 References: <cover.1344028781.git.jani@nikula.org>
\r
54 ALoCoQmE8osAwE4gv58B4/1l8IfhbNKol9KKgZiIupN4nqFkKCHiwReAMGy2aKTLR/hmfK9yNcIp
\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: Fri, 03 Aug 2012 21:52:19 -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 b8ab52d..cec3785 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