class Integer

def years

2.years # => 2 years

Returns a Duration instance matching the number of years provided.
def years
  ActiveSupport::Duration.years(self)
end