date_create

Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8
Alias DateTime::__construct
<?php         $val = DateTime::createFromFormat($platform->getDateTimeFormatString(), $value);



        if ($val === false) {

            $val = date_create($value);

        }



        if ($val === false) {
<?php             return $value;

        }



        $val = date_create($value);

        if ($val === false) {

            throw ConversionException::conversionFailed($value, $this->getName());

        }
<?php         $response->headers->set('Content-Length', $cache->getSize($path));

        $response->setPublic();

        $response->setMaxAge(31536000);

        $response->setExpires(date_create()->modify('+1 years'));



        if ($this->request) {

            $response->setLastModified(date_create()->setTimestamp($cache->getTimestamp($path)));
<?php         $response->setExpires(date_create()->modify('+1 years'));



        if ($this->request) {

            $response->setLastModified(date_create()->setTimestamp($cache->getTimestamp($path)));

            $response->isNotModified($this->request);

        }