Method: DateTime#midnight

Defined in:
activesupport/lib/active_support/core_ext/date_time/calculations.rb

#midnightObject

Returns a new DateTime representing the start of the day (0:00).



125
126
127
# File 'activesupport/lib/active_support/core_ext/date_time/calculations.rb', line 125

def beginning_of_day
  change(hour: 0)
end