[Rails] Re: Getting the number of years between two dates

2008-11-21 Thread Pardee, Roy
You can also do Time.now.year - other_date.year Cheers, -Roy -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gsterndale Sent: Thursday, November 20, 2008 11:26 PM To: Ruby on Rails: Talk Subject: [Rails] Re: Getting the number

[Rails] Re: Getting the number of years between two dates

2008-11-20 Thread gsterndale
I've done so in the past with the Time class. ((Time.now-past_date)/1.year).round On Nov 20, 10:42 pm, James Englert [EMAIL PROTECTED] wrote: Hey,   I need to get the number of years (as a number) between two dates. Here is what I have as a helper.   # Returns the number of years between