src/Pattern/StdPatterns/DatePattern.php
public function fromUrl(string $param)
    {
        if ($this->checkDate($param)) {
            return new \DateTimeImmutable($param, $this->timezone);
        }

        throw $this->newInvalidFromUrl($param);
    }
public function fromUrl(string $param)
    {
        if ($this->checkDate($param)) {
            return new \DateTimeImmutable($param, $this->timezone);
        }

        throw $this->newInvalidFromUrl($param);
    }
public function fromUrl ( string $ param ) { if ( $ this -> checkDate ( $ param ) ) { return new \ DateTimeImmutable ( $ param , $ this -> timezone ) ; } throw $ this -> newInvalidFromUrl ( $ param ) ; }
Convert date in format YYYY-mm-dd to \DateTimeImmutable object

@param string $param

@return \DateTimeImmutable

@throws PatternException
Convert date in format YYYY - mm - dd to \ DateTimeImmutable object