Set the working week.
@param week the JodaWorkingWeek
@throws IllegalArgumentException if the week is not a JodaWorkingWeek.
554093
public DateCalculator<LocalDate> setWorkingWeek(final WorkingWeek week) {
        if (week instanceof JodaWorkingWeek) {
            workingWeek = (JodaWorkingWeek) week;
            return this;
        }
        throw new IllegalArgumentException("Please give an instance of JodaWorkingWeek");
    }
67483
public void setWeekOfYearVisible(boolean weekOfYearVisible) {
		if (weekOfYearVisible == this.weekOfYearVisible) {
			return;
		} else if (weekOfYearVisible) {
			add(weekPanel, BorderLayout.WEST);
		} else {
			remove(weekPanel);
		}

		this.weekOfYearVisible = weekOfYearVisible;
		validate();
		dayPanel.validate();
	}
584557
function callDateSetWithWeek(d, method, value, safe) {
  if (method === 'ISOWeek') {
    setISOWeekNumber(d, value);
  } else {
    callDateSet(d, method, value, safe);
  }
}
606158
public void setWeeklyDay(Day day, boolean value)
   {
      if (value)
      {
         m_days.add(day);
      }
      else
      {
         m_days.remove(day);
      }
   }
599921
private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay)
   {
      int dayNumber = weekDay.getDayType().intValue();
      Day day = Day.getInstance(dayNumber);
      calendar.setWorkingDay(day, BooleanHelper.getBoolean(weekDay.isDayWorking()));
      ProjectCalendarHours hours = calendar.addCalendarHours(day);

      Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes times = weekDay.getWorkingTimes();
      if (times != null)
      {
         for (Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime period : times.getWorkingTime())
         {
            Date startTime = period.getFromTime();
            Date endTime = period.getToTime();

            if (startTime != null && endTime != null)
            {
               if (startTime.getTime() >= endTime.getTime())
               {
                  endTime = DateHelper.addDays(endTime, 1);
               }

               hours.addRange(new DateRange(startTime, endTime));
            }
         }
      }
   }
109807
private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day)
   {
      if (day.isIsDayWorking())
      {
         ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day.getDay());
         for (Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods.TimePeriod period : day.getTimePeriods().getTimePeriod())
         {
            hours.addRange(new DateRange(period.getFrom(), period.getTo()));
         }
      }
   }
634896
private void setWeekDays(SortedSet<WeekDay> weekDays) {

        List<CmsCheckBox> checked = new ArrayList<CmsCheckBox>();

        for (WeekDay day : weekDays) {
            for (CmsCheckBox box : m_checkboxes) {
                if (box.getInternalValue().equals(day.toString())) {
                    checked.add(box);
                }
            }
        }
        for (CmsCheckBox box : m_checkboxes) {
            if (checked.contains(box)) {
                box.setChecked(true);
            } else {
                box.setChecked(false);
            }
        }

    }
1334307
public void setJobClass(Class<? extends Job> jobClass) {

    if (jobClass == null) {
      throw new IllegalArgumentException("Job class cannot be null.");
    }

    if (!Job.class.isAssignableFrom(jobClass)) {
      throw new IllegalArgumentException("Job class must implement the Job interface.");
    }

    this.jobClass = jobClass;
  }
67815
public Project.Calendars.Calendar.WorkWeeks.WorkWeek createProjectCalendarsCalendarWorkWeeksWorkWeek()
   {
      return new Project.Calendars.Calendar.WorkWeeks.WorkWeek();
   }
135514
private void setCalendarToLastRelativeDay(Calendar calendar)
   {
      calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
      int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
      int requiredDayOfWeek = getDayOfWeek().getValue();
      int dayOfWeekOffset = 0;

      if (currentDayOfWeek > requiredDayOfWeek)
      {
         dayOfWeekOffset = requiredDayOfWeek - currentDayOfWeek;
      }
      else
      {
         if (currentDayOfWeek < requiredDayOfWeek)
         {
            dayOfWeekOffset = -7 + (requiredDayOfWeek - currentDayOfWeek);
         }
      }

      if (dayOfWeekOffset != 0)
      {
         calendar.add(Calendar.DAY_OF_YEAR, dayOfWeekOffset);
      }
   }
773239
public void setDayOfWeek(com.google.api.ads.admanager.axis.v201808.DayOfWeek dayOfWeek) {
        this.dayOfWeek = dayOfWeek;
    }
1185499
public final void setCellFactory(
            Callback<WeekDayHeaderView, WeekDayCell> factory) {
        requireNonNull(factory);
        cellFactoryProperty().set(factory);
    }
1082310
private SortedSet<WeekDay> readWeekDays(JSONValue val) {

        JSONArray array = null == val ? null : val.isArray();
        if (null != array) {
            SortedSet<WeekDay> result = new TreeSet<>();
            for (int i = 0; i < array.size(); i++) {
                try {
                    result.add(readWeekDay(array.get(i)));
                } catch (@SuppressWarnings("unused") IllegalArgumentException e) {
                    // Just skip
                }
            }
            return result;
        }
        return new TreeSet<>();
    }
564128
public function setWeekOffset($weekOffset) {
        $weekOffset = Assert::isInt($weekOffset);
        if($weekOffset > 6 || $weekOffset < 0) {
            throw new InvalidArgumentException('Week Offset must be between 0 and 6');
        }
        $this->weekOffset = $weekOffset;
    }
255445
public void setCalendar(ProjectCalendar calendar)
   {
      set(TaskField.CALENDAR, calendar);
      setCalendarUniqueID(calendar == null ? null : calendar.getUniqueID());
   }
508618
protected void drawWeeks() {
		Calendar tmpCalendar = (Calendar) calendar.clone();

		for (int i = 1; i < 7; i++) {
			tmpCalendar.set(Calendar.DAY_OF_MONTH, (i * 7) - 6);

			int week = tmpCalendar.get(Calendar.WEEK_OF_YEAR);
			String buttonText = Integer.toString(week);

			if (week < 10) {
				buttonText = "0" + buttonText;
			}

			weeks[i].setText(buttonText);

			if ((i == 5) || (i == 6)) {
				weeks[i].setVisible(days[i * 7].isVisible());
			}
		}
	}
235914
public final void setDateHire(final Date pDateHire) {
    if (pDateHire == null) {
      this.dateHire = null;
    } else {
      this.dateHire = new Date(pDateHire.getTime());
    }
  }