Bug in rails-1.2.3(number.years.ago)

30.years.ago -> ok
40.years.ago -> error
is it bug?

30.years.ago -> ok
40.years.ago -> error
is it bug?

It's because instance of Time on your machine can't represent dates
before 1970

Fred

I’m surprised by this. Rails is usually smart enough to convert to DateTime where needed in these ActiveSupport time converting scenarios. From my irb…

sneaky:~ rsl$ irb

ActiveSupport

=> ActiveSupport # Just to point out AS is loaded here

Time.now.class

=> Time

10.years.ago.class

=> Time

100.years.ago.class

=> Time

1000.years.ago.class

=> DateTime

What version Rails are you using?

RSL

RSL ___ wrote:

What version Rails are you using?

On Mon, Sep 15, 2008 at 5:55 AM, Frederick Cheung <

my os -windows-xp :: rails version 1.2.3