Hello,
I've some trouble with years.ago I want so use in calendar_date_select as described here: http://code.google.com/p/calendardateselect/wiki/CalendarDateSelectParameters I wrote: <%= contact.calendar_date_select :birth_date, {:size => 10, :label => 'Birthday',:year_range => [65.years.ago, 0.years.from_now]} %></td>
But years.ago seems to be bound to the OS'es time-routines, that is quite annoying:
eg. Linux: ruby script/console Loading development environment.
65.years.ago
=> Mon Jan 11 06:21:12 +0100 1943
Windows XP 32-Bit ruby script/console Loading development environment.
65.years.ago
ArgumentError: time must be positive from W:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/numeric/time.rb:56:in `-' from W:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/numeric/time.rb:56:in `ago' from (irb):1
Is there a way to work around this issue - MySQL has no trouble saving dates down to 1000 anno domini....
Thanks, Keep smiling yanosz