Skip to content

meltedice/date_age

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

home

github.com/meltedice/date_age

Calculate age

The latest version of DateAge can be installed with RubyGems:

% [sudo] gem install date_age

To calculate age:

gem 'date_age'
require 'date_age'

birthday = Date.parse("1989/02/11")
puts birthday.age_at("2012/02/12") # => 23
puts birthday.age                  # => same as birthday.age_at(Date.today)

DateAge is released under the MIT license.

This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.

About

Add age_at and age methods to Date

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages