[sup-talk] [PATCH] Natural language date searches

Marcus Williams marcus-sup at quintic.co.uk
Fri Oct 26 18:10:55 EDT 2007


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) 

and even combine them. For more examples see the Chronic docs at [1].
The brackets are important... watch the logs for oddities like:

after:(yesterday)

which probably wont do what you think as chronic sets a time of midday
on the converted date. Specify a time if you need to or use "24 hours
ago" or something.


Marcus

[1] http://chronic.rubyforge.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: date-search-diff
Type: application/octet-stream
Size: 912 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071026/312f7611/attachment.obj 


More information about the sup-talk mailing list