public function dateTimeISO8601Local($subject) : bool
    {
        // Ugly method name because \DateTime uses strict acronym camelCasing.

        if ($subject === null) {
            return false;
        }
        $v = '' . $subject;
        return strlen($v) <= 19 && !!preg_match('/^\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}(:\d{2})?$/', $v);
    }
public function dateTimeISO8601Local($subject) : bool
    {
        // Ugly method name because \DateTime uses strict acronym camelCasing.

        if ($subject === null) {
            return false;
        }
        $v = '' . $subject;
        return strlen($v) <= 19 && !!preg_match('/^\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}(:\d{2})?$/', $v);
    }
public function dateTimeISO8601Local ( $ subject ) : bool { // Ugly method name because \DateTime uses strict acronym camelCasing. if ( $ subject === null ) { return false ; } $ v = '' . $ subject ; return strlen ( $ v ) <= 19 && ! ! preg_match ( '/^\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}(:\d{2})?$/' , $ v ) ; }
ISO-8601 datetime without timezone indication.

Doesn't require seconds. Forbids decimals of seconds.

YYYY-MM-DD HH:II(:SS)?
The format is supported by native \DateTime constructor.

@see Validate::string()

@param mixed $subject
Checked stringified.

@return bool
ISO - 8601 datetime without timezone indication .