Sha256: 3ec233371990f8b3f60e4fd1817943e12dbeedb62d0e3c9d69033f07779871ea

Contents?: true

Size: 547 Bytes

Versions: 1

Compression:

Stored size: 547 Bytes

Contents


= SixArm.com » Ruby » Date #age_in_years and #age_in_days methods

Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
Copyright:: Copyright (c) 2006-2011 Joel Parker Henderson
License:: See LICENSE.txt file

Date extensions to calculate an age in days and years.

@example

  date=Date.new(1980,10,31)
  date.age_in_days => 11124
  date.age_in_years => 31

@example of custom dates

  date=Date.new(1980,10,31)
  new_years_eve=(2011,12,31)
  date.age_in_days_on(new_years_eve) => 11383
  date.age_in_years_on(new_years_eve) => 31


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_date_age-1.1.0 README.rdoc