code: function(date) {
      var day = getWeekday(date);
      if (day === 0) {
        day = -6;
      } else if (day !== 1) {
        day = 1;
      }
      setWeekday(date, day);
      return resetTime(date);
    }
docs: *
  @method beginningOfISOWeek()
  @returns Date
  @short Set the date to the beginning of week as defined by ISO8601.
  @extra Note that this standard places Monday at the start of the week.
  This method modifies the date!
  
  @example
  
  new Date().beginningOfISOWeek() -> Monday
  
  *