Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Response.php

function Response::getDate

Returns the Date header as a DateTime instance.

@final

Throws

\RuntimeException When the header is not parseable

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function getDate() : ?\DateTimeImmutable {
    return $this->headers
        ->getDate('Date');
}
RSS feed
Powered by Drupal