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