class Integer
def months
# equivalent to Time.now.advance(months: 4, years: 5)
2.years.from_now
# equivalent to Time.now.advance(years: 2)
1.month.from_now
# equivalent to Time.now.advance(months: 1)
results from a Time object.
from_now, +ago+, etc. as well as adding or subtracting their
These methods use Time#advance for precise date calculations when using
2.hours + 4.years.
Enables the use of time calculations and declarations, like 45.minutes +
def months ActiveSupport::Duration.new(self * 30.days, [[:months, self]]) end