Re: TimeRange ''this weekend''

Nathan Esquenazi
Mon, 19 May 2008 20:25:53 -0000

Probably overkill for this simple question but chronic so cool, I
thought I would mention it. Chronic is an incredible time parsing
library that makes parsing natural languages into time a sinch. ''next
weekend'' is only the tip of the iceberg.

http://chronic.rubyforge.org/

Chronic.parse(''tomorrow'')
    #=> Mon Aug 28 12:00:00 PDT 2006

  Chronic.parse(''monday'', :context => :past)
    #=> Mon Aug 21 12:00:00 PDT 2006
--
Posted via http://www.ruby-forum.com/.