Fully Qualified Name: | Laminas\Http\Header\LastModified |
Extends: | AbstractDate |
Last-Modified Header
Name | Description | Defined By |
---|---|---|
__toString() | Allow casting to string | AbstractDate |
compareTo() | Compare provided date to date for this header Returns < 0 if date in header is less than $date; > 0 if it's greater, and 0 if they are equal. | AbstractDate |
date() | Return date for this header as an instance of \DateTime | AbstractDate |
fromString() | Create date-based header from string | AbstractDate |
fromTimeString() | Create date-based header from strtotime()-compatible string | AbstractDate |
fromTimestamp() | Create date-based header from Unix timestamp | AbstractDate |
getDate() | Return date for this header | AbstractDate |
getDateFormat() | Return current date output format | AbstractDate |
getFieldName() | Get header name | LastModified |
getFieldValue() | Get header value as formatted date | AbstractDate |
setDate() | Set the date for this header, this can be a string or an instance of \DateTime | AbstractDate |
setDateFormat() | Set date output format | AbstractDate |
toString() | Return header line | AbstractDate |
Allow casting to string
Returns: string
Compare provided date to date for this header Returns < 0 if date in header is less than $date; > 0 if it's greater, and 0 if they are equal.
Parameter Name | Type | Description |
---|---|---|
$date | string|\DateTime |
Returns: int
Return date for this header as an instance of \DateTime
Returns: \DateTime
Create date-based header from string
Parameter Name | Type | Description |
---|---|---|
$headerLine | string |
Returns: static
Create date-based header from strtotime()-compatible string
Parameter Name | Type | Description |
---|---|---|
$time | int|string |
Returns: static
Create date-based header from Unix timestamp
Parameter Name | Type | Description |
---|---|---|
$time | int |
Returns: static
Return date for this header
Returns: string
Return current date output format
Returns: string
Get header name
Returns: string
Get header value as formatted date
Returns: string
Set the date for this header, this can be a string or an instance of \DateTime
Parameter Name | Type | Description |
---|---|---|
$date | string|\DateTime |
Returns: $this
Set date output format
Parameter Name | Type | Description |
---|---|---|
$format | int |
Returns:
Return header line
Returns: string