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