src/Matchers/DateMatch.php
protected static function checkDate($day, $month, $year)
    {
        // Tolerate both day-month and month-day order
        if ((12 <= $month && $month <= 31) && $day <= 12) {
            $m = $month;
            $month = $day;
            $day = $m;
        }
        if ($day > 31 || $month > 12) {
            return false;
        }
        if (!(1900 <= $year && $year <= 2019)) {
            return false;
        }

        return [$day, $month, $year];
    }
protected static function checkDate($day, $month, $year)
    {
        // Tolerate both day-month and month-day order
        if ((12 <= $month && $month <= 31) && $day <= 12) {
            $m = $month;
            $month = $day;
            $day = $m;
        }
        if ($day > 31 || $month > 12) {
            return false;
        }
        if (!(1900 <= $year && $year <= 2019)) {
            return false;
        }

        return [$day, $month, $year];
    }
protected static function checkDate ( $ day , $ month , $ year ) { // Tolerate both day-month and month-day order if ( ( 12 <= $ month && $ month <= 31 ) && $ day <= 12 ) { $ m = $ month ; $ month = $ day ; $ day = $ m ; } if ( $ day > 31 || $ month > 12 ) { return false ; } if ( ! ( 1900 <= $ year && $ year <= 2019 ) ) { return false ; } return [ $ day , $ month , $ year ] ; }
Validate date.

@param int $day
@param int $month
@param int $year

@return array|false
Validate date .