You are here

public function Response::getDate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Response.php \Symfony\Component\HttpFoundation\Response::getDate()

Returns the Date header as a DateTime instance.

Return value

\DateTime A \DateTime instance

Throws

\RuntimeException When the header is not parseable

File

vendor/symfony/http-foundation/Response.php, line 609

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function getDate() {
  return $this->headers
    ->getDate('Date', new \DateTime());
}