set unit to week
762695
def week(self):
        ''''''
        self.magnification = 345600
        self._update(self.baseNumber, self.magnification)
        return self
399753
public void setWeekDayFormatter(WeekDayFormatter formatter) {
    adapter.setWeekDayFormatter(formatter == null ? WeekDayFormatter.DEFAULT : formatter);
  }
62303
def _weeks_check(self, data, week_type):
        """"""
        assert isinstance(data, dict), '{}' \
            ' must be an OrderedDict. Got {}.'.format(week_type, type(data))
        if bool(data) is True:
            for val in data.values():
                assert isinstance(val, AnalysisPeriod), '{} dictionary must contain' \
                    ' AnalysisPeriod objects. Got {}.'.format(week_type, type(val))
                assert len(val.doys_int) == 7, '{} AnalysisPeriod must be for'\
                    ' a week.  Got AnalysisPeriod for {} days.'.format(
                        week_type, type(val))
1211755
private void setWorkingDays(ProjectCalendar mpxjCalendar, Calendars gpCalendar)
   {
      DayTypes dayTypes = gpCalendar.getDayTypes();
      DefaultWeek defaultWeek = dayTypes.getDefaultWeek();
      if (defaultWeek == null)
      {
         mpxjCalendar.setWorkingDay(Day.SUNDAY, false);
         mpxjCalendar.setWorkingDay(Day.MONDAY, true);
         mpxjCalendar.setWorkingDay(Day.TUESDAY, true);
         mpxjCalendar.setWorkingDay(Day.WEDNESDAY, true);
         mpxjCalendar.setWorkingDay(Day.THURSDAY, true);
         mpxjCalendar.setWorkingDay(Day.FRIDAY, true);
         mpxjCalendar.setWorkingDay(Day.SATURDAY, false);
      }
      else
      {
         mpxjCalendar.setWorkingDay(Day.MONDAY, isWorkingDay(defaultWeek.getMon()));
         mpxjCalendar.setWorkingDay(Day.TUESDAY, isWorkingDay(defaultWeek.getTue()));
         mpxjCalendar.setWorkingDay(Day.WEDNESDAY, isWorkingDay(defaultWeek.getWed()));
         mpxjCalendar.setWorkingDay(Day.THURSDAY, isWorkingDay(defaultWeek.getThu()));
         mpxjCalendar.setWorkingDay(Day.FRIDAY, isWorkingDay(defaultWeek.getFri()));
         mpxjCalendar.setWorkingDay(Day.SATURDAY, isWorkingDay(defaultWeek.getSat()));
         mpxjCalendar.setWorkingDay(Day.SUNDAY, isWorkingDay(defaultWeek.getSun()));
      }

      for (Day day : Day.values())
      {
         if (mpxjCalendar.isWorkingDay(day))
         {
            ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day);
            hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
            hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
         }
      }
   }
884451
def set_data(self, *args):
        """"""
        db = self.begining.get_data() or formats.DATE_DEFAULT
        df = self.end.get_data() or formats.DATE_DEFAULT
        jours = max((df - db).days + 1, 0)
        self.setText(str(jours) + (jours >= 2 and " jours" or " jour"))
963127
public final void setWeekDays(SortedSet<WeekDay> weekDays) {

        m_weekDays.clear();
        if (null != weekDays) {
            m_weekDays.addAll(weekDays);
        }
    }
607489
static void rollToNextWeekStart(DTBuilder builder, Weekday wkst) {
        DateValue bd = builder.toDate();
        builder.day += (7 - ((7 + (Weekday.valueOf(bd).javaDayNum
                - wkst.javaDayNum))
                % 7)) % 7;
        builder.normalize();
    }
842329
function formatWeekDataAsModule(weekData) {
  const date = new Date();
  const { firstDay, weekendEnd, weekendStart } = weekData;
  const transformed = {
    firstDay: transformWeekDays(firstDay),
    weekendEnd: transformWeekDays(weekendEnd),
    weekendStart: transformWeekDays(weekendStart)
  };
  const formatted = JSON.stringify(transformed, null, 2);
  const js =
`// Generated at ${date}
// from https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json
const weekData = ${formatted};
export default weekData;
`;
  return js;
}
141992
public final void setWeeksOfMonth(SortedSet<WeekOfMonth> weeksOfMonth) {

        m_weeksOfMonth.clear();
        if (null != weeksOfMonth) {
            m_weeksOfMonth.addAll(weeksOfMonth);
        }

    }
1132375
public WeeklyAutoScalingSchedule withSunday(java.util.Map<String, String> sunday) {
        setSunday(sunday);
        return this;
    }
573594
def weekly(date=datetime.date.today()):
    
    return date - datetime.timedelta(days=date.weekday())
450932
public final void setWeekDay(WeekDay weekDay) {

        SortedSet<WeekDay> wds = new TreeSet<>();
        if (null != weekDay) {
            wds.add(weekDay);
        }
        setWeekDays(wds);

    }
589539
public WeeklyAutoScalingSchedule withWednesday(java.util.Map<String, String> wednesday) {
        setWednesday(wednesday);
        return this;
    }
1190845
def picknthweekday(year, month, dayofweek, hour, minute, whichweek):
    """"""
    first = datetime.datetime(year, month, 1, hour, minute)
    weekdayone = first.replace(day=((dayofweek-first.isoweekday())%7+1))
    for n in range(whichweek):
        dt = weekdayone+(whichweek-n)*ONEWEEK
        if dt.month == month:
            return dt
690126
private static void moveToIMMDay(final Calendar cal) {
        cal.set(DAY_OF_MONTH, 1);

        // go to 1st wed
        final int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
        if (dayOfWeek < WEDNESDAY) {
            cal.add(DAY_OF_MONTH, WEDNESDAY - dayOfWeek);
        } else if (dayOfWeek > WEDNESDAY) {
            cal.add(DAY_OF_MONTH, WEDNESDAY + NUMBER_DAYS_IN_WEEK - dayOfWeek);
        }

        // go to 3rd wednesday - i.e. move 2 weeks forward
        cal.add(DAY_OF_MONTH, NUMBER_DAYS_IN_WEEK * 2);
    }
54067
function (nthWeek, day, range) {
        var rangeInfo = this._getRangeInfo(range);

        if (nthWeek > rangeInfo.weeks
            || (nthWeek === 0 && day < rangeInfo.fweek)
            || (nthWeek === rangeInfo.weeks && day > rangeInfo.lweek)
        ) {
            return false;
        }

        var nthDay = (nthWeek - 1) * 7 - rangeInfo.fweek + day;
        var date = new Date(rangeInfo.start.time);
        date.setDate(rangeInfo.start.d + nthDay);

        return this.getDateInfo(date);
    }
814715
public WeeklyAutoScalingSchedule withTuesday(java.util.Map<String, String> tuesday) {
        setTuesday(tuesday);
        return this;
    }