private function isDatePath(string $path): ?array
    {
        if (preg_match(
            '/(\d{4})[\/\-]*(\d{2})[\/\-]*(\d{2})[\/\-]*(.+?)(\.[^\.]+|\.[^\.]+\.[^\.]+)$/',
            $path,
            $matches
        )) {
            return [$matches[1], $matches[2], $matches[3], $matches[4]];
        }

        return null;
    }
private function isDatePath(string $path): ?array
    {
        if (preg_match(
            '/(\d{4})[\/\-]*(\d{2})[\/\-]*(\d{2})[\/\-]*(.+?)(\.[^\.]+|\.[^\.]+\.[^\.]+)$/',
            $path,
            $matches
        )) {
            return [$matches[1], $matches[2], $matches[3], $matches[4]];
        }

        return null;
    }
private function isDatePath ( string $ path ) : ? array { if ( preg_match ( '/(\d{4})[\/\-]*(\d{2})[\/\-]*(\d{2})[\/\-]*(.+?)(\.[^\.]+|\.[^\.]+\.[^\.]+)$/' , $ path , $ matches ) ) { return [ $ matches [ 1 ] , $ matches [ 2 ] , $ matches [ 3 ] , $ matches [ 4 ] ] ; } return null ; }
Does the specified path represent a date?

@param string $path

@return mixed
Does the specified path represent a date?