On Sun, Jan 1, 2012 at 9:54 AM, John Merlino <[email protected]> wrote:
> Chronic will parse a date range in console:
> However, when I use logger to check if it's parsing in application, it
> is not:
Loading development environment (Rails 3.1.2)
ruby-1.9.2-p290 :001 > result = Chronic.parse(1/1/2011 - 1/1/2012,
:guess => false)
=> 2012-01-01 12:00:00 -0800..2012-01-01 12:00:01 -0800
ruby-1.9.2-p290 :002 > result = Chronic.parse('1/1/2011 - 1/1/2012',
:guess => false)
=> nil
ruby-1.9.2-p290 :003 > result = Chronic.parse(eval('1/1/2011 -
1/1/2012'), :guess => false)
=> 2012-01-01 12:00:00 -0800..2012-01-01 12:00:01 -0800
ruby-1.9.2-p290 :004 >
HTH!
--
Hassan Schroeder ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.