From: Oliver Cromm Date: 2006-09-14T06:15:47+09:00 Subject: Re: [ANN] Chronic-0.1.0 * Tom Werner wrote: > I am pleased to announce the FIRST release of Chronic. Nice work! > Chronic uses Ruby's built in Time class for all time storage and > computation. Because of this, only times that the Time class can > handle will be properly parsed. Parsing for times outside of this > range will simply return nil. Support for a wider range of times is > planned for a future release. Some things that I noticed on Cygwin: - I have to require 'time', otherwise, I'm getting an error "no method parse for class Time". I'll put that into chronic.rb - I had to upgrade to Ruby 1.8.5. With 1.8.4, I got lots of "time out of range" errors - it would be good if non-supported constructions return "nil" always, but sometimes they return wrong parses, and some produce errors Examples: "now" -> Wed Sep 13 16:09:16 -0400 2006 "20 minutes before noon tomorrow" -> Wed Sep 13 23:40:00 -0400 2006 (= "20 minutes before midnight", how come?) "in a few days" -> Thu Sep 14 16:12:30 -0400 2006 (= "in a day") "hour" -> Wed Sep 13 16:37:00 -0400 2006 (= "the middle between the next full minute and the next hour") Similarly, "day", "year" etc. make for weird answers. The same answers come out if you combine them with ignored words, e.g.: "one hour back" (= "hour" = "the middle between the next full minute and the next hour") "three days later" (= "day" = "the middle between the next full hour and the next day") "3 days later" -> Wed Sep 13 15:00:00 -0400 2006 (= "3 days" = "3 day" = "3 today") "20 minutes before 3 yesterday" -> Error /usr/lib/ruby/gems/1.8/gems/chronic-0.1.1/lib/chronic/repeaters/repeater_minute. rb:11:in `offset': undefined method `+' for nil:NilClass (NoMethodError) [...] For the future, it would be nice if it understood "five hours" as well as "5 hours". I'm working in NLP and ready to help. -- Pentiums melt in your PC, not in your hand.