From: marcus-sup@bar-coded.net (Marcus Williams)
Subject: [sup-talk] [PATCH] Natural language date searches
Date: Fri, 09 Nov 2007 20:44:08 +0000 [thread overview]
Message-ID: <1194640984-sup-1658@tomsk> (raw)
In-Reply-To: <1194639409-sup-6180@tomsk>
On 9.11.2007, Marcus Williams wrote:
> On 9.11.2007, William Morgan wrote:
> > Modified to skip parsing if Chronic isn't available, and applied.
> > Thanks!
> >
> > Also made it accept one-word Chronic tokens without parentheses,
> > although "after:yesterday" means "after yesterday noon", which maybe is
> > not so useful...
>
> I think I may have worked out how to fix that - change the parse
> method to be:
>
> realdate = Chronic.parse(datestr, :guess => false).begin
Mmmm - in fact it might be that you want to use .begin when you are
searching "before", but .end when you are searching "after"
That way searches like after:yesterday or after:(last monday) do what
you expect. Patch attached
Marcus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: search-patch
Type: application/octet-stream
Size: 1111 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071109/1631a80b/attachment.obj
next prev parent reply other threads:[~2007-11-09 20:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 22:10 Marcus Williams
2007-10-27 21:10 ` Marcus Williams
2007-11-09 18:46 ` William Morgan
2007-11-09 20:29 ` Marcus Williams
2007-11-09 20:44 ` Marcus Williams [this message]
2007-11-09 21:20 ` Marcus Williams
2007-11-12 18:01 ` William Morgan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1194640984-sup-1658@tomsk \
--to=marcus-sup@bar-coded.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox