[RFC PATCH 0/2] natural language date range search
authorJani Nikula <jani@nikula.org>
Sun, 19 Feb 2012 22:55:50 +0000 (00:55 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:44 +0000 (09:44 -0800)
c3/b5b4112c5c3f1a6ba8e95fbbc1fc9069ed2dc8 [new file with mode: 0644]

diff --git a/c3/b5b4112c5c3f1a6ba8e95fbbc1fc9069ed2dc8 b/c3/b5b4112c5c3f1a6ba8e95fbbc1fc9069ed2dc8
new file mode 100644 (file)
index 0000000..f2a4ea4
--- /dev/null
@@ -0,0 +1,108 @@
+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 3C865431FC0\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 14:56:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 Bm7w7f1ULuIj for <notmuch@notmuchmail.org>;\r
+       Sun, 19 Feb 2012 14:55:59 -0800 (PST)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id EB30C431FAE\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 14:55:58 -0800 (PST)\r
+Received: by lahd3 with SMTP id d3so5943891lah.26\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 14:55:56 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of jani@nikula.org designates\r
+       10.152.123.68 as permitted sender) client-ip=10.152.123.68; \r
+Authentication-Results: mr.google.com;\r
+       spf=pass (google.com: domain of jani@nikula.org\r
+       designates 10.152.123.68 as permitted sender)\r
+       smtp.mail=jani@nikula.org\r
+Received: from mr.google.com ([10.152.123.68])\r
+       by 10.152.123.68 with SMTP id ly4mr13451530lab.13.1329692156079\r
+       (num_hops = 1); Sun, 19 Feb 2012 14:55:56 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.152.123.68 with SMTP id ly4mr11259344lab.13.1329692156005;\r
+       Sun, 19 Feb 2012 14:55:56 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
+       [84.248.80.253])\r
+       by mx.google.com with ESMTPS id s6sm21422411lbl.12.2012.02.19.14.55.53\r
+       (version=SSLv3 cipher=OTHER); Sun, 19 Feb 2012 14:55:55 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH 0/2] natural language date range search\r
+Date: Mon, 20 Feb 2012 00:55:50 +0200\r
+Message-Id: <cover.1329689945.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.5.4\r
+X-Gm-Message-State:\r
+ ALoCoQnqnbkFb8zcSyIAhNbqZytTytjqIYUPuaTr+rvqqtLw7vMLyJ9uOFKQ9XGepPuRXwsmXFA1\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: Sun, 19 Feb 2012 22:56:01 -0000\r
+\r
+Hi all, these patches add support for natural language date range search\r
+of the form date:since..until, where since and until can be fairly free\r
+form date/time expressions in English.\r
+\r
+Examples:\r
+\r
+date:two-days..yesterday (all mail in the two days before today)\r
+date:12h.. (all mail since 12 hrs ago)\r
+date:november..november (all mail in previous november)\r
+date:2011.. (all mail since the beginning of 2011)\r
+date:last-week..this-week (all mail over last and current week)\r
+date:5/10/2011-12:34:55..10pm_2012-01-14\r
+\r
+Plus plenty more and combinations of the above.\r
+\r
+The repository for the date/time parser with a command line tool is at\r
+[1], and there's a README [2] with a bunch of details too.\r
+\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+[1] https://gitorious.org/parse-time-string/parse-time-string\r
+[2] https://gitorious.org/parse-time-string/parse-time-string/blobs/master/README\r
+\r
+\r
+Jani Nikula (2):\r
+  lib: add date/time parser\r
+  lib: add date range search\r
+\r
+ lib/Makefile.local      |    2 +\r
+ lib/database-private.h  |    1 +\r
+ lib/database.cc         |    4 +\r
+ lib/getdate-proc.cc     |   34 ++\r
+ lib/getdate-proc.h      |   21 +\r
+ lib/parse-time-string.c | 1304 +++++++++++++++++++++++++++++++++++++++++++++++\r
+ lib/parse-time-string.h |   95 ++++\r
+ 7 files changed, 1461 insertions(+), 0 deletions(-)\r
+ create mode 100644 lib/getdate-proc.cc\r
+ create mode 100644 lib/getdate-proc.h\r
+ create mode 100644 lib/parse-time-string.c\r
+ create mode 100644 lib/parse-time-string.h\r
+\r
+-- \r
+1.7.5.4\r
+\r