<p>
Redefine a certain day of the month to be excluded (true) or included
(false).
</p>

@param int  $day The day of the month (from 1 to 31) to set.
@param bool $exclude
324690
public function setDayExcluded($day, $exclude)
    {
        DateBuilder::validateDayOfMonth($day);

        $days = $this->getValue('excludeDays', []);

        if ($exclude) {
            if (false === array_search($day, $days, true)) {
                $days[] = $day;
                sort($days, SORT_NUMERIC);
            }
        } else {
            if (false !== $index = array_search($day, $days, true)) {
                unset($days[$index]);
                $days = array_values($days);
            }
        }

        $this->setValue('excludeDays', $days);
    }
1117309
public void setSelectedDate(int year, int month, int day) {
        dateSpinner.setSelectedDate(new GregorianCalendar(year, month, day));
        // a custom selection has been set, don't select the default date:
        shouldSelectDefault = false;
    }
413233
private function setDay($day) {
        
        //preventing duplication process
        if ($day == $this->day) {
            return;
        }
        $maximumDayOfMonth = static::getMonthLength($this->month, $this->year);
        $dayToSet          = $day;
        if ($dayToSet < 1) {
            
            $dayToSet = abs($dayToSet);
            
            while ($dayToSet > $maximumDayOfMonth) {
                $dayToSet -= $maximumDayOfMonth;
                $month    = $this->month - 1;
                $this->setMonth($month);
                $maximumDayOfMonth = static::getMonthLength($this->month, $this->year);
            }
            
            $dayToSet = $maximumDayOfMonth - $dayToSet;
            $month    = $this->month - 1;
            $this->setMonth($month);
            
        } elseif ($dayToSet > $maximumDayOfMonth) {
            while ($dayToSet > $maximumDayOfMonth) {
                $dayToSet -= $maximumDayOfMonth;
                $month    = $this->month + 1;
                $this->setMonth($month);
                $maximumDayOfMonth = static::getMonthLength($this->month, $this->year);
            }
        }
        
        $this->day = (int) $dayToSet;
    }
831059
public function dontSeeMonthInYear($date, $month)
    {
        \PHPUnit_Framework_Assert::assertNotEquals($month, $this->_ParseDate($date)->month);
    }
889191
function(year, month, day) {
			if (!this._calendar.isValid(year, month, day)) {
				throw ($.calendars.local.invalidDate || $.calendars.regionalOptions[''].invalidDate).
					replace(/\{0\}/, this._calendar.local.name);
			}
			this._year = year;
			this._month = month;
			this._day = day;
			return this;
		}
981788
public void addExcludedDate (final Date excludedDate)
  {
    final Date date = getStartOfDayJavaCalendar (excludedDate.getTime ()).getTime ();
    /*
     * System.err.println( "HolidayCalendar.add(): date=" +
     * excludedDate.toLocaleString());
     */
    m_aDates.add (date);
  }
97463
public function setExcluded($excluded = true)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setExcluded($excluded);
        }

        return $this;
    }
343640
public function setDate($year, $month, $day)
	{
		if ($this->datetime->setDate($year, $month, $day))
		{
			return $this;
		}

		return false;
	}
500133
public void setDay(Day d)
   {
      if (m_day != null)
      {
         m_parentCalendar.removeHoursFromDay(this);
      }

      m_day = d;

      m_parentCalendar.attachHoursToDay(this);
   }
1328745
private function isDateValid(int $year, int $month, int $day) : bool
    {
        if ($day === 0) {
            return false;
        }

        switch ($month) {
            case 2:
                $days = $this->isLeapYear($year) ? 29 : 28;
                break;

            case 4:
            case 6:
            case 9:
            case 11:
                $days = 30;
                break;

            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                $days = 31;
                break;

            default:
                return false;
        }

        return $day <= $days;
    }
592433
public function dontSeeDateIsSaturday($date) {
        \PHPUnit_Framework_Assert::assertFalse($this->_ParseDate($date)->dayOfWeek == Carbon::SATURDAY);
    }
306345
function setDay( $day )
    {
        $arr = getdate( $this->Date );
        $this->Date = mktime( 0, 0, 0, $arr['mon'], $day, $arr['year'] );
    }
897903
public function setDate($year, $month, $day)
    {
        return parent::setDate(self::$yearMustAlwaysBe, self::$monthMustAlwaysBe, self::$dayMustAlwaysBe);
    }
676037
public function setStartDay($daysBack)
    {
        if (!is_null($daysBack)) {
            $this->addStatusMessage('Start Date '.date('Y-m-d',
                    mktime(0, 0, 0, date("m"), date("d") - $daysBack, date("Y"))));
        }
        $this->daysBack = $daysBack;
    }
320302
public function setExclude($exclude) {

		if(false === is_array($exclude)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type Array, "%s" given', __METHOD__, gettype($exclude)), E_USER_ERROR);
		}

		$this -> exclude = $exclude;

		return $this;
	}
3878
public function setExcludes($excludes)
    {
        if ($this->isReference()) {
            throw $this->tooManyAttributes();
        }
        if ($excludes !== null && strlen($excludes) > 0) {
            $tok = strtok($excludes, ", ");
            while ($tok !== false) {
                $o = $this->createExclude();
                $o->setName($tok);
                $tok = strtok(", ");
            }
        }
    }
779803
public void setDaysExcluded (final boolean [] days)
  {
    if (days == null)
    {
      throw new IllegalArgumentException ("The days parameter cannot be null.");
    }

    if (days.length < MAX_DAYS_IN_MONTH)
    {
      throw new IllegalArgumentException ("The days parameter must have a length of at least " +
                                          MAX_DAYS_IN_MONTH +
                                          " elements.");
    }

    m_aExcludeDays = days;
    m_aExcludeAll = areAllDaysExcluded ();
  }