adroit-age

Gem Version

This gem is used to find the age using date of birth, its also works for leap years.

Installation

gem install adroit-age

Insert into your gem file

gem "adroit-age"

Usage

require 'adroit-age'

dob =  Date.new(1990,1,23)
or
dob = "23/01/1990".to_date

age = dob.find_age
#=> 23

Update v2.0

dob.find_age_with_month
#=> "23 years and 11 months"

dob.find_age_with_month("y","m")
#=> "23 y and 11 m"

dob.find_age_with_month
#=> "23 years and 1 month"

Contributing to adroit-age

Copyright © 2013 Raj Adroit. See LICENSE.txt for further details.