[PATCH v4 8/9] man: document the date:since..until range queries
authorJani Nikula <jani@nikula.org>
Sat, 13 Oct 2012 22:09:54 +0000 (01:09 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:47 +0000 (09:49 -0800)
40/1873812cf241568dc9b4c883e85eacb7b5eb4b [new file with mode: 0644]

diff --git a/40/1873812cf241568dc9b4c883e85eacb7b5eb4b b/40/1873812cf241568dc9b4c883e85eacb7b5eb4b
new file mode 100644 (file)
index 0000000..6a80c06
--- /dev/null
@@ -0,0 +1,249 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 6C65C431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 13 Oct 2012 15:10:25 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id NU5z8hxFWKYb for <notmuch@notmuchmail.org>;\r
+       Sat, 13 Oct 2012 15:10:24 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 8A756431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 13 Oct 2012 15:10:24 -0700 (PDT)\r
+Received: by mail-lb0-f181.google.com with SMTP id gg6so2988019lbb.26\r
+       for <notmuch@notmuchmail.org>; Sat, 13 Oct 2012 15:10:24 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :in-reply-to:references:x-gm-message-state;\r
+       bh=N1Ae/7X67HxGxXBlS8P8uxrKB4pxOubrwB6OBuBQiC0=;\r
+       b=LJ7biLFPbznqsDPy8roEof/uufppmy9RgJhjLwLvPKm64IJx+EzrFk/BwY21a6qbXI\r
+       j9AZaMNZ6chC+06sYsuRGBkhewl6OQ8nASMJAaiNA4GgtVZvWe3REdjwTPYppZQOS11b\r
+       zdk0eevLDxL+LhxACbjlwZiYthIaASYmPiJEPNuSTZAyZiDtw5B8gMSpi6FUJypYTwYz\r
+       7AgYjkB3GAhiBrw5Af5VV5yZHfrNVECKxKsP3xDY2l5mk5WVh8vhW+nqmxat6R22j7Ki\r
+       lrWYNAWmu9RRypSybAm+pfleJ+9F+wRPW+RH16SJzET/jf3r+wm1Ko9ao1zDjD+Iu1bb\r
+       45Vw==\r
+Received: by 10.112.82.6 with SMTP id e6mr2914836lby.93.1350166224159;\r
+       Sat, 13 Oct 2012 15:10:24 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id r8sm3272537lba.15.2012.10.13.15.10.22\r
+       (version=SSLv3 cipher=OTHER); Sat, 13 Oct 2012 15:10:23 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 8/9] man: document the date:since..until range queries\r
+Date: Sun, 14 Oct 2012 01:09:54 +0300\r
+Message-Id:\r
+ <e48ce9a33f0228f8ff6f7b0d574056c1c200e709.1350164594.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.9.5\r
+In-Reply-To: <cover.1350164594.git.jani@nikula.org>\r
+References: <cover.1350164594.git.jani@nikula.org>\r
+In-Reply-To: <cover.1350164594.git.jani@nikula.org>\r
+References: <cover.1350164594.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQkzaNgZiXj2vVWR4yWg5igaVU0WiBr/ovu5zoGN3SmmtwJgnV77UFVeE2enHZLvP1gvB4Rj\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 13 Oct 2012 22:10:25 -0000\r
+\r
+---\r
+ man/man7/notmuch-search-terms.7 |  147 +++++++++++++++++++++++++++++++++++----\r
+ 1 file changed, 135 insertions(+), 12 deletions(-)\r
+\r
+diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7\r
+index 17a109e..fbd3ee7 100644\r
+--- a/man/man7/notmuch-search-terms.7\r
++++ b/man/man7/notmuch-search-terms.7\r
+@@ -54,6 +54,8 @@ terms to match against specific portions of an email, (where\r
+ \r
+       folder:<directory-path>\r
+ \r
++      date:<since>..<until>\r
++\r
+ The\r
+ .B from:\r
+ prefix is used to match the name or address of the sender of an email\r
+@@ -104,6 +106,26 @@ contained within particular directories within the mail store. Only\r
+ the directory components below the top-level mail database path are\r
+ available to be searched.\r
+ \r
++The\r
++.B date:\r
++prefix can be used to restrict the results to only messages within a\r
++particular time range (based on the Date: header) with a range syntax\r
++of:\r
++\r
++      date:<since>..<until>\r
++\r
++See \fBDATE AND TIME SEARCH\fR below for details on the range\r
++expression, and supported syntax for <since> and <until> date and time\r
++expressions.\r
++\r
++The time range can also be specified using timestamps with a syntax\r
++of:\r
++\r
++      <initial-timestamp>..<final-timestamp>\r
++\r
++Each timestamp is a number representing the number of seconds since\r
++1970\-01\-01 00:00:00 UTC.\r
++\r
+ In addition to individual terms, multiple terms can be\r
+ combined with Boolean operators (\r
+ .BR and ", " or ", " not\r
+@@ -117,20 +139,121 @@ operators, but will have to be protected from interpretation by the\r
+ shell, (such as by putting quotation marks around any parenthesized\r
+ expression).\r
+ \r
+-Finally, results can be restricted to only messages within a\r
+-particular time range, (based on the Date: header) with a syntax of:\r
++.SH DATE AND TIME SEARCH\r
+ \r
+-      <initial-timestamp>..<final-timestamp>\r
++This is a non-exhaustive description of the date and time search with\r
++some pseudo notation. Most of the constructs can be mixed freely, and\r
++in any order, but the same absolute date or time can't be expressed\r
++twice.\r
+ \r
+-Each timestamp is a number representing the number of seconds since\r
+-1970\-01\-01 00:00:00 UTC. This is not the most convenient means of\r
+-expressing date ranges, but until notmuch is fixed to accept a more\r
+-convenient form, one can use the date program to construct\r
+-timestamps. For example, with the bash shell the following syntax would\r
+-specify a date range to return messages from 2009\-10\-01 until the\r
+-current time:\r
+-\r
+-      $(date +%s \-d 2009\-10\-01)..$(date +%s)\r
++.RS 4\r
++.TP 4\r
++.B The range expression\r
++\r
++date:<since>..<until>\r
++\r
++The above expression restricts the results to only messages from\r
++<since> to <until>, based on the Date: header.\r
++\r
++If <since> or <until> describes time at an accuracy of days or less,\r
++the date/time is rounded, towards past for <since> and towards future\r
++for <until>, to be inclusive. For example, date:january..february\r
++matches from the beginning of January until the end of\r
++February. Similarly, date:yesterday..yesterday matches from the\r
++beginning of yesterday until the end of yesterday.\r
++\r
++Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's\r
++possible to specify date:..<until> or date:<since>.. to not limit the\r
++start or end time, respectively. Unfortunately, pre-1.2.1 Xapian does\r
++not report an error on open ended ranges, but it does not work as\r
++expected either.\r
++\r
++Xapian does not support spaces in range expressions. You can replace\r
++the spaces with '_', or (in most cases) '-', or (in some cases) leave\r
++the spaces out altogether.\r
++\r
++Entering date:expr without ".." (for example date:yesterday) won't\r
++work, as it's not interpreted as a range expression at all. You can\r
++achieve the expected result by duplicating the expr both sides of ".."\r
++(for example date:yesterday..yesterday).\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Relative date and time\r
++[N|number] (years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs) [...]\r
++\r
++All refer to past, can be repeated and will be accumulated.\r
++\r
++Units can be abbreviated to any length, with the otherwise ambiguous\r
++single m being m for minutes and M for months.\r
++\r
++Number multiplier can also be written out one, two, ..., ten, dozen,\r
++hundred. As special cases last means one ("last week") and this means\r
++zero ("this month").\r
++\r
++When combined with absolute date and time, the relative date and time\r
++specification will be relative from the specified absolute date and\r
++time.\r
++\r
++Examples: 5M2d, two weeks\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Supported time formats\r
++H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]\r
++\r
++H[H] (am|a.m.|pm|p.m.)\r
++\r
++HHMMSS\r
++\r
++now\r
++\r
++noon\r
++\r
++midnight\r
++\r
++Examples: 17:05, 5pm\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Supported date formats\r
++YYYY-MM[-DD]\r
++\r
++DD-MM[-[YY]YY]\r
++\r
++MM-YYYY\r
++\r
++M[M]/D[D][/[YY]YY]\r
++\r
++M[M]/YYYY\r
++\r
++D[D].M[M][.[YY]YY]\r
++\r
++D[D][(st|nd|rd|th)] Mon[thname] [YYYY]\r
++\r
++Mon[thname] D[D][(st|nd|rd|th)] [YYYY]\r
++\r
++Wee[kday]\r
++\r
++Month names can be abbreviated at three or more characters.\r
++\r
++Weekday names can be abbreviated at three or more characters.\r
++\r
++Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Time zones\r
++(+|-)HH:MM\r
++\r
++(+|-)HH[MM]\r
++\r
++Some time zone codes, e.g. UTC, EET.\r
++.RE\r
+ \r
+ .SH SEE ALSO\r
+ \r
+-- \r
+1.7.9.5\r
+\r