Set the day field of the date object

@param int the day
@return int the day
541884
public function day($value = null)
    {
        if ($value !== null) {
            if ($value > 31 || $value < 1) {
                $this->day = 1;
            } else {
                $this->day = $value;
            }
        }
        return $this->day;
    }
460432
public static Day getDay(Integer day)
   {
      Day result = null;
      if (day != null)
      {
         result = DAY_ARRAY[day.intValue()];
      }
      return (result);
   }
1181218
public void setDay(int d) {
		if (d < 1) {
			d = 1;
		}
		Calendar tmpCalendar = (Calendar) calendar.clone();
		tmpCalendar.set(Calendar.DAY_OF_MONTH, 1);
		tmpCalendar.add(Calendar.MONTH, 1);
		tmpCalendar.add(Calendar.DATE, -1);

		int maxDaysInMonth = tmpCalendar.get(Calendar.DATE);

		if (d > maxDaysInMonth) {
			d = maxDaysInMonth;
		}

		int oldDay = day;
		day = d;

		if (selectedDay != null) {
			selectedDay.setBackground(oldDayBackgroundColor);
			selectedDay.repaint();
		}

		for (int i = 7; i < 49; i++) {
			if (days[i].getText().equals(Integer.toString(day))) {
				selectedDay = days[i];
				selectedDay.setBackground(selectedColor);
				break;
			}
		}

		if (alwaysFireDayProperty) {
			firePropertyChange("day", 0, day);
		} else {
			firePropertyChange("day", oldDay, day);
		}
	}
460290
public static function addDays($date, $days) {
        if (Validator::isDateTime($date) === false) throw new InvalidArgumentException('Invalid argument $date: '.$date);
        if (!is_int($days))                         throw new IllegalTypeException('Illegal type of parameter $days: '.gettype($days));

        $parts = explode('-', $date);
        $year  = (int) $parts[0];
        $month = (int) $parts[1];
        $day   = (int) $parts[2];

        return date('Y-m-d', mktime(0, 0, 0, $month, $day+$days, $year));
    }
352721
private function matchesLastDay($day, \DateTime $date)
    {
        $day = substr($day, 0, -1);

        if ($day != $this->getFieldValueFromDate($date)) {
            return false;
        }

        return $this->matchesRelativeDate($date, 'last');
    }
1318323
public function atDay(int $dayOfWeek) : LocalDate
    {
        Field\DayOfWeek::check($dayOfWeek);

        $correction = LocalDate::of($this->year, 1, 4)->getDayOfWeek()->getValue() + 3;
        $dayOfYear = $this->week * 7 + $dayOfWeek - $correction;
        $maxDaysOfYear = Field\Year::isLeap($this->year) ? 366 : 365;

        if ($dayOfYear > $maxDaysOfYear) {
            return LocalDate::ofYearDay($this->year + 1, $dayOfYear - $maxDaysOfYear);
        }

        if ($dayOfYear > 0) {
            return LocalDate::ofYearDay($this->year, $dayOfYear);
        }

        $daysOfPreviousYear = Field\Year::isLeap($this->year - 1) ? 366 : 365;

        return LocalDate::ofYearDay($this->year - 1, $daysOfPreviousYear + $dayOfYear);
    }
1135118
void selectDay(int year, int month, int day) {
        Calendar cal = Calendar.getInstance();
        cal.set(year, month, day);
        Date date = cal.getTime();
        this.field.setText(simpleDateFormat.format(date));
        if (popup != null) {
            popup.hide();
            popup = null;
        }
    }
385439
protected function modifyDay( $day )
	{
		$classes	= array();
		if( (int)$this->getOption( 'show_day' ) == $day )
			$classes[]	= 'shown';
		if( in_array( $day, $this->events ) )
		{
			$url	= $this->getOption( 'url' );
			$url	.= "&".$this->getOption( 'carrier_year' )."=".$this->getOption( 'show_year' );
			$url	.= "&".$this->getOption( 'carrier_month' )."=".$this->getOption( 'show_month' );
			$url	.= "&".$this->getOption( 'carrier_day' )."=".$day;
			$day	= $this->html->Link( $url, $day );
			$classes[]	= 'event';
		}
		$class	= implode( ' ', $classes );
		return $data	= array( 'day'	=> $day, 'class' => $class );		
	}
58560
public final function addDays( int $days = 1 )
      : DateTime
   {

      return $this->move( new \DateInterval( 'P' . \abs( $days ) . 'D' ), $days < 0 );

   }
451459
public static int day(EvaluationContext ctx, Object date) {
        return Conversions.toDateOrDateTime(date, ctx).get(ChronoField.DAY_OF_MONTH);
    }
1169344
public static java.util.Date getDayAsDate(int day) {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, day);
        return cal.getTime();
    }
255146
public function setDate($year, $month, $day) {
		$this->set("$year/$month/$day ".$this->format('HH:mm:ss'), null, 'yyyy/MM/dd HH:mm:ss');
		return $this;
	}
919367
public int getDay()
    {
        Timestamp adjusted = this;
        if (this._offset != null) {
            if (this._offset.intValue() != 0) {
                adjusted = make_localtime();
            }
        }
        return adjusted._day;
    }
155345
public function setDate($year, $month, $day)
    {
      // Validate
      self::validateDate($year, $month, $day);
      
      // Set internal year, month and day variables
      $this->year  = (int)$year;
      $this->month = (int)$month;
      $this->day   = (int)$day;
    }
1330580
public function withDay(int $day) : ZonedDateTime
    {
        return ZonedDateTime::of($this->localDateTime->withDay($day), $this->timeZone);
    }
701140
public static int calendarDay2Day(int day) {
        switch (day) {
            case Calendar.SUNDAY:
                return SU;
            case Calendar.MONDAY:
                return MO;
            case Calendar.TUESDAY:
                return TU;
            case Calendar.WEDNESDAY:
                return WE;
            case Calendar.THURSDAY:
                return TH;
            case Calendar.FRIDAY:
                return FR;
            case Calendar.SATURDAY:
                return SA;
            default:
                throw new RuntimeException("bad day of week: " + day);
        }
    }
705254
public function plusDays(int $days) : LocalDate
    {
        if ($days === 0) {
            return $this;
        }

        return LocalDate::ofEpochDay($this->toEpochDay() + $days);
    }