instance method
months_ago
Ruby on Rails 4.0.13
Since v4.0.13Signature
months_ago(months)
Returns a new date/time the specified number of months ago.
Parameters
-
monthsreq
Source
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 59
def months_ago(months)
advance(:months => -months)
end
Defined in activesupport/lib/active_support/core_ext/date_and_time/calculations.rb line 59
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateAndTime::Calculations