beginning_of_week()
public
Returns a new Time representing the
"start" of this week (Monday, 0:00)
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 161
def beginning_of_week
days_to_monday = wday!=0 ? wday-1 : 6
(self - days_to_monday.days).midnight
end