# File lib/active_support/core_ext/time/calculations.rb, line 165 def beginning_of_week days_to_monday = wday!=0 ? wday-1 : 6 (self - days_to_monday.days).midnight end