Years
Small gem for year related methods. Includes a method for calculating a person's age and another for helping create
a year range (say for a Web site's copyright statement). Two methods exist for calculating the age for when the
legal leapling birthday is 28 Feb (NZ) or 1 Mar (UK). Please check your country's rules.
Installation
Add this line to your application's Gemfile:
gem 'years'
And then execute:
$ bundle
Or install it yourself as:
$ gem install years
Usage
require 'years'
Years.age_where_leapling_legal_birthday_is_1_mar('22 Sep 1976'.to_date)
Years.range(2012)
Contributing
- Fork it ( http://github.com/nigel-lowry/years/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request