Symfony\Component\HttpFoundation\HeaderBag::getDate
Returns the HTTP header value converted to a date.
Signature
public function getDate(string
$key,
[DateTime
$default = null] )
Parameters
$key
— string- The parameter key
$default
— \DateTime- The default value
Returns
- DateTime
- The parsed DateTime or the default value if the header does not exist
Errors/Exceptions
-
RuntimeException
- When the HTTP header is not parseable