instance method
months_ago
Ruby on Rails 7.2.3
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 97
def months_ago(months)
advance(months: -months)
end
Defined in activesupport/lib/active_support/core_ext/date_and_time/calculations.rb line 97
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateAndTime::Calculations