Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] Natural language date searches
@ 2007-10-26 22:10 Marcus Williams
  2007-10-27 21:10 ` Marcus Williams
  0 siblings, 1 reply; 7+ messages in thread
From: Marcus Williams @ 2007-10-26 22:10 UTC (permalink / raw)


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 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-12 18:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-26 22:10 [sup-talk] [PATCH] Natural language date searches 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
2007-11-09 21:20         ` Marcus Williams
2007-11-12 18:01           ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox