Returns whether date information (day, month, year) are present as keys in $source.
@param $source
@return bool
550593
protected function isDatePartKeysProvided(array $source)
    {
        return isset($source['day']) && ctype_digit($source['day'])
            && isset($source['month']) && ctype_digit($source['month'])
            && isset($source['year']) && ctype_digit($source['year']);
    }
913271
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $result = $this->db->query("SELECT key FROM cache WHERE key='" . $this->key($key) . "' WHERE expire >= datetime('now')");
        $has_key = ($result->numRows() > 0);

        $this->Logger->debug("Cache contains {$key}? " . ($has_key) ? 'TRUE' : 'FALSE');

        return $has_key;
    }
1341541
function days_in_month($month = 0, $year = '') {
		if ($month < 1 || $month > 12) {
			$month = $this->mdate('m');
		}
		if (!is_numeric($year) || strlen($year) != 4) {
			$year = date('Y');
		}
		if ($month == 2) {
			if ($year % 400 == 0 || ($year % 4 == 0 && $year % 100 != 0)) {
				return 29;
			}
		}

		$days_in_month	= array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
		return $days_in_month[$month - 1];
	}
800251
public static function isDate($object)
    {
        return $object instanceof \DateTime || (static::isString($object) && strtotime((string)$object) !== false);
    }
989375
public function contains(Date $date) : bool
    {
        return $this->start->comesBeforeOrEqual($date) && $this->end->comesAfterOrEqual($date);
    }
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;
    }
1157497
public function isBirthday(Time $dt)
        {
            return $this->month === $dt->month && $this->day === $dt->day;
        }
14121
public static function isDateFormat($date, $format = 'Y-m-d')
    {
        if (!$unixTime = strtotime($date)) {
            return false;
        }

        // 校验日期的格式有效性
        if (date($format, $unixTime) === $date) {
            return true;
        }

        return false;
    }
351327
public function isLeapYear(int $year = null) : bool
    {
        return !!date(
            'L',
            $year === null ? $this->getTimestamp() : mktime(1, 1, 1, 2, 1, $year)
        );
    }
774773
public function has($source)
    {
        $path = (gettype($source) === 'string')
            ? realpath($source) : $source->getName();

        return $this->sources->containsKey($path);
    }
1287241
public function isMonthInDateFormat(string $dateFormat)
    {
        return false !== strpos($dateFormat, 'F') ||
            false !== strpos($dateFormat, 'M') ||
            false !== strpos($dateFormat, 'm') ||
            false !== strpos($dateFormat, 'n');
    }
1293574
public static function isDate($input = false, $format = 'Y-m-d H:i:s') {

        if ($input && Date::isDate($input)) {

            return true;
        }

        return false;
    }
859857
public function isBirthday(ChronosInterface $dt = null)
    {
        if ($dt === null) {
            $dt = static::now($this->tz);
        }

        return $this->format('md') === $dt->format('md');
    }
1009541
public static function checkBirthDate($day, $month, $year) {
        if (empty($day) || empty($month) || empty($year))
            return false;

        return checkdate($month, $day, $year);
    }
1204142
private function isValidDate(string $date, string $format = 'Y-m-d') : bool
    {
        $d = DateTime::createFromFormat($format, $date);
        // The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue.
        return $d && $d->format($format) === $date;
    }
59152
public boolean isSameDate(CalendarDate date) {
        return getDayOfWeek() == date.getDayOfWeek()
            && getMonth() == date.getMonth()
            && getYear() == date.getYear()
            && getEra() == date.getEra();
    }
1071928
public static function isToday($time): bool
    {
        return (self::factory($time)->format('Y-m-d') === self::factory()->format('Y-m-d'));
    }