From mboxrd@z Thu Jan 1 00:00:00 1970 From: marcus-sup@quintic.co.uk (Marcus Williams) Date: Sat, 27 Oct 2007 22:10:35 +0100 Subject: [sup-talk] [PATCH] Natural language date searches In-Reply-To: <1193436327-sup-5753@tomsk> References: <1193436327-sup-5753@tomsk> Message-ID: <1193519205-sup-6445@tomsk> On 26/10/2007, Marcus Williams wrote: > With the help of the fantastic Chronic gem, this patch adds date based > searches to sup with natural language. So you can do > > after:(1 week ago) > after:(yesterday at 22:00) > > and > > before:(today at 5:00) Attached is a tweaked patch so that you dont get an error if you pass a query string that Chronic cant parse. Currently it removes the query from the query string if it cant parse it and warns the user. It probably needs a change to bin/sup to ignore the query if parse_user_query_string returns an empty query, but this patch doesnt include that. Marcus -------------- next part -------------- A non-text attachment was scrubbed... Name: date-search-diff Type: application/octet-stream Size: 1085 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071027/61248a8e/attachment.obj