yii\validators\DateValidator::parseDateValueFormat PHP Method

parseDateValueFormat() private method

Parses date string into UNIX timestamp
private parseDateValueFormat ( string $value, string $format ) : integer | false
$value string string representing date
$format string expected date format
return integer | false a UNIX timestamp or `false` on failure.
    private function parseDateValueFormat($value, $format)
    {
        if (is_array($value)) {
            return false;
        }
        if (strncmp($format, 'php:', 4) === 0) {
            $format = substr($format, 4);
        } else {
            if (extension_loaded('intl')) {
                return $this->parseDateValueIntl($value, $format);
            } else {
                // fallback to PHP if intl is not installed
                $format = FormatConverter::convertDateIcuToPhp($format, 'date');
            }
        }
        return $this->parseDateValuePHP($value, $format);
    }