Updated dateAtStartOfWeek method with the rangeOfUnit:startDateInterval:forDate