From: Robert Dober Date: 2007-05-01T16:14:59+09:00 Subject: Re: how to represent Date before epoch as a integer On 5/1/07, Yaxm Yaxm wrote: > Rober, > converting the date object to be a time can cause the exception: > >> birth_date(50) > => # > >> birth_date(50).to_time > ArgumentError: argument out of range > > Time.new().years_ago(50) causes the same exception > Why do you use Time? Does Date not do the job? #years_ago is a method of the ActiveRecord extension of Date. I guess we might not be talking about the same thing, maybe if you post more code? But look at Nobu's suggestion, seems to work just fine. Cheers Robert -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw