chronic

Problems with RSpec and Chronic

I'm trying to use Chronic inside my non-rails project. When I try to get the specs with 'spec' I get the following error: $ spec spec/parsers/parser_english_spec.rb /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- chronic (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_requ...

Chronic (Ruby NLP date/time parser) for python?

Does anyone know of a library like chronic but for python? Thanks! ...

How can I use the Chronic natural language date/time parser to parse "12:00" as 12:00 PM?

I am using the ruby gem "Chronic" to parse four digit strings as DateTime objects. I am using time in military format (ie: "0800") which seems from the documentaion to be a valid format. In most cases, Chronic parses time in this format correctly - however it always parses a four digit string beginning with "12" as 00:XX AM of the ne...

does chronic have any options of date format it parses? (ruby)

I need to tell chronic that the format of date is day-month-year is that possible? The data I pass to chronic could also be words today/yesterday/2 days ago. Currently chronic gives me 2 Dec 2010 instead of 12 Feb 2010 from 12-02-2010 The only solution I can think of is to swap day and month before passing the string to chronic. requi...

Can using Chronic impair your sense of time?

Haha.. I'm using Chronic to parse the time users add in the Calendar. Where the code works and implements the right time, the end result is that, IF a user adds a time, then it has no date, and because it has no date, it will not show in results. Any ideas? def set_dates unless self.natural_date.blank? || Chronic.parse(self.natural_d...

Problems installing rdoc, irb, bluecloth, chronic on fedora 12

Hello, What do these errors mean? [root@localhost config]# gem install bluecloth Building native extensions. This could take a while... ERROR: Error installing bluecloth: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb can't find header files for ruby. Gem files will remain installed in /usr/lib64/ruby/g...

rails -- parse military time into AM/PM, using chronic?

Hello, I've been using Chronic, the natural language parser and its awesome. The problem I'm running into now is I cant parse the military time its give me back in to some form of AM/PM time that would be normal for a user to see. <%= Chronic.parse("next monday") %> yields => Mon Jul 05 12:00:00 -0500 2010 Is there a way to go b...

How to use Chronic to parse dates in a datetime text_field

I'm trying to get a text field that my users can enter in something that is parsable by the Chronic gem. Here is my model file: require 'chronic' class Event < ActiveRecord::Base belongs_to :user validates_presence_of :e_time before_validation :parse_date def parse_date self.e_time = Chronic.parse(self.e_time_before_type_...

Rubygems Chronic cannot parse "2010-09-12 3:12pm" but can parse "2010-09-12 3pm" or "last monday 3:12pm"?

It seems strange that "2010--9-12 3:12pm" is a weak spot of Chronic Rubygem? Is there a way to make it work? (or another gem that can do it?) I also hope to find a parser that can handle 2010-09-12 3:12pm UTC or other timezones such as PDT, PST, or UTC+8 or -0700 irb(main):001:0> RUBY_VERSION => "1.8.7" irb(main):002:0> require 'rub...