From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [RFC PATCH 0/2] natural language date range search
Date: Mon, 20 Feb 2012 00:55:50 +0200 [thread overview]
Message-ID: <cover.1329689945.git.jani@nikula.org> (raw)
Hi all, these patches add support for natural language date range search
of the form date:since..until, where since and until can be fairly free
form date/time expressions in English.
Examples:
date:two-days..yesterday (all mail in the two days before today)
date:12h.. (all mail since 12 hrs ago)
date:november..november (all mail in previous november)
date:2011.. (all mail since the beginning of 2011)
date:last-week..this-week (all mail over last and current week)
date:5/10/2011-12:34:55..10pm_2012-01-14
Plus plenty more and combinations of the above.
The repository for the date/time parser with a command line tool is at
[1], and there's a README [2] with a bunch of details too.
BR,
Jani.
[1] https://gitorious.org/parse-time-string/parse-time-string
[2] https://gitorious.org/parse-time-string/parse-time-string/blobs/master/README
Jani Nikula (2):
lib: add date/time parser
lib: add date range search
lib/Makefile.local | 2 +
lib/database-private.h | 1 +
lib/database.cc | 4 +
lib/getdate-proc.cc | 34 ++
lib/getdate-proc.h | 21 +
lib/parse-time-string.c | 1304 +++++++++++++++++++++++++++++++++++++++++++++++
lib/parse-time-string.h | 95 ++++
7 files changed, 1461 insertions(+), 0 deletions(-)
create mode 100644 lib/getdate-proc.cc
create mode 100644 lib/getdate-proc.h
create mode 100644 lib/parse-time-string.c
create mode 100644 lib/parse-time-string.h
--
1.7.5.4
next reply other threads:[~2012-02-19 22:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-19 22:55 Jani Nikula [this message]
2012-02-19 22:55 ` [RFC PATCH 1/2] lib: add date/time parser Jani Nikula
2012-02-26 8:45 ` Mark Walters
2012-02-26 20:39 ` Jani Nikula
2012-02-19 22:55 ` [RFC PATCH 2/2] lib: add date range search Jani Nikula
2012-02-25 15:05 ` [RFC PATCH 0/2] natural language " Tomi Ollila
2012-02-25 19:53 ` Jani Nikula
2012-02-27 7:45 ` Tomi Ollila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1329689945.git.jani@nikula.org \
--to=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).