Creates a date from the given components.

@param day the day of the month, 1-31.
@param month the month, 1-12.
@param year the year.
@return a date with the specified settings.
429118
public static Date createDate(final int day, final int month, final int year) {
		Calendar cal = Calendar.getInstance();
		cal.clear();

		cal.set(Calendar.DAY_OF_MONTH, day);
		cal.set(Calendar.MONTH, month - 1);
		cal.set(Calendar.YEAR, year);

		return cal.getTime();
	}
245735
public void setDate(
            final int year,
            final int monthOfYear,
            final int dayOfMonth) {
        Chronology c = getChronology();
        long instantMidnight = c.getDateTimeMillis(year, monthOfYear, dayOfMonth, 0);
        setDate(instantMidnight);
    }
1356849
public static java.sql.Date getSqlDate(int year, int month, int date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new java.util.Date(0));
        cal.set(Calendar.YEAR, year);
        cal.set(Calendar.MONTH, month - 1);
        cal.set(Calendar.DATE, date);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);

        return getSqlDate(cal.getTime());
    }
475428
int getDaysInYearMonth(int year, int month) {
        if (month == 12 && isLeapYear(year)) {
            return LONG_MONTH_LENGTH;
        }
        return (--month % 2 == 0 ? LONG_MONTH_LENGTH : SHORT_MONTH_LENGTH);
    }
601618
function(inst, day, month, year) {
		if (!day) {
			inst.currentDay = inst.selectedDay;
			inst.currentMonth = inst.selectedMonth;
			inst.currentYear = inst.selectedYear;
		}
		var date = (day ? (typeof day == 'object' ? day :
			this._daylightSavingAdjust(new Date(year, month, day))) :
			this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
		return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
	}
1039745
function(year, month, day) {
    var dayOfWeek = this.createDate(year, month, day).getDay();
    return dayOfWeek === this.SATURDAY || dayOfWeek === this.SUNDAY;
  }
631335
protected static function getDayOfYear($day, $month) {
        
        $dayOfYear = $day;
        if ($month > 6) {
            $dayOfYear += (186 + (($month - 6 - 1) * 30));
        } else {
            $dayOfYear += (($month - 1) * 31);
        }
        
        return $dayOfYear;
    }
83708
public static Date fromJavaUtilDate(java.util.Date date) {
    Calendar cal = Calendar.getInstance();
    cal.setTime(date);
    cal.set(Calendar.HOUR_OF_DAY, 0);
    cal.set(Calendar.MINUTE, 0);
    cal.set(Calendar.SECOND, 0);
    cal.set(Calendar.MILLISECOND, 0);
    // Calender.MONTH starts from 0 while G C date starts from 1
    return new Date(
        cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH));
  }
1147796
public function ymdToJd($year, $month, $day)
    {
        return
            $this->yToJd($year) +
            self::$CUMULATIVE_DAYS[$this->isLeapYear($year)][$this->yearType($year)][$month] +
            $day - 1;
    }
549913
public static String format(Integer year, Integer month, Integer day)
	{
		Object[] _args =
		{
				year, month, day
		};
		return SHORT__DATE.format(_args);
	}
943951
public function set(int $day, int $month, int $year)
    {
        $validator = new DateValidator($day, $month, $year);

        if (!$validator->isValid()) {
            throw new InvalidDateException();
        }

        $this->day = $day;
        $this->month = $month;
        $this->year = $year;

        $this->jdn = (int) static::process($day, $month, $year);

        return $this;
    }
11157
public static Integer getDayOfYear(Date date) {

        if (date == null)
            return null;

        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);

        return calendar.get(Calendar.DAY_OF_YEAR);
    }
1025292
private static int getDayOfMonth(Date date) {
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		return cal.get(Calendar.DAY_OF_MONTH);
	}
1294210
private int getDayIndex(int year, int month, int day) {
        Calendar cal = Calendar.getInstance();
        cal.set(year, month, day);
        return cal.get(Calendar.DAY_OF_WEEK);
    }
769994
public static Date dateReservedYear000(Calendar calendar) {
        calendar.set(Calendar.MONTH, Calendar.JANUARY);
        calendar.set(Calendar.DAY_OF_MONTH, 1);

        return dateReservedDay000(calendar);
    }
1169344
public static java.util.Date getDayAsDate(int day) {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, day);
        return cal.getTime();
    }
1322041
function(year, month, date) {

    // change value from to zero-based
    date--;
    year--;

    // combine year and month to get the actual year and month
    // this allows user to set a negative month number
    var months = year2months(year) + month;
    year = months2year(months);
    month = months - year2months(year);
    months -= month;

    var days = getNewYearInDays(months);

    var leap = isLeap(year);
    var nextYear = getNextYearInDays(months, leap);
    var mode = getYearMode(days, nextYear, leap);

    days += Math.ceil(month * 29.5);
    if(month > 1 && mode == 1 || month > 2) days += mode;
    if(month > 5) days += leap;

    days += date;

    return days - DISTANCE;
  }