Sculpin\Core\Permalink\SourcePermalinkFactory::isDatePath PHP Method

isDatePath() private method

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