instance method
first_hour
Ruby on Rails 4.1.16
Since v4.0.13 PrivateSignature
first_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 239
def first_hour(date_or_time)
date_or_time.acts_like?(:time) ? date_or_time.beginning_of_day : date_or_time
end
Defined in activesupport/lib/active_support/core_ext/date_and_time/calculations.rb line 239
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateAndTime::Calculations