class method
self.yesterday
Ruby on Rails 5.2.8.1
Since v3.0.20Signature
self.yesterday()
Returns a new Date representing the date 1 day ago (i.e. yesterday’s date).
Source
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 38
def yesterday
::Date.current.yesterday
end
Defined in activesupport/lib/active_support/core_ext/date/calculations.rb line 38
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Date