instance method
beginning_of_month
Ruby on Rails 4.2.9
Since v4.0.13Signature
beginning_of_month()
Returns a new date/time at the start of the month. DateTime objects will have a time set to 0:00.
Source
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 80
def beginning_of_month
first_hour(change(:day => 1))
end
Defined in activesupport/lib/active_support/core_ext/date_and_time/calculations.rb line 80
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateAndTime::Calculations