instance method
last_hour
Ruby on Rails 8.0.4
Since v4.0.13 PrivateSignature
last_hour(date_or_time)
No documentation comment.
Parameters
-
date_or_timereq
Source
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 362
def last_hour(date_or_time)
date_or_time.acts_like?(:time) ? date_or_time.end_of_day : date_or_time
end
Defined in activesupport/lib/active_support/core_ext/date_and_time/calculations.rb line 362
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateAndTime::Calculations