instance method
prev_day
Ruby on Rails 6.1.7.10
Since v6.0.6Signature
prev_day(days = 1)
Returns a new time the specified number of days ago.
Parameters
-
daysopt = 1
Source
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 337
def prev_day(days = 1)
advance(days: -days)
end
Defined in activesupport/lib/active_support/core_ext/time/calculations.rb line 337
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Time