From: Deniz Dogan Date: 2007-03-15T01:15:05+09:00 Subject: Re: Calculating the age given DOB Brian Adkins wrote: > Deniz Dogan wrote: >> Hello, fellow rubyists. >> >> I have a problem. I'm trying to write a simple program which >> calculates the age of a person given the person's date of birth in an >> instance of a Date class. I have no idea what is the best way to do >> this. I don't feel like using any ugly "hacks" to do it, and I wonder >> if there is any good (perhaps mathematical) algorithm out there to >> solve the problem. >> >> --Deniz Dogan > > > (DateTime.now - birthdate) / 365.25 And this would work with Date objects?