instance method
last_hour
Ruby on Rails 7.0.10
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 352
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 352
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateAndTime::Calculations