824. Class

824.1. Zend\Http\Header\AbstractDate

Abstract Date/Time Header Supports headers that have date/time as value

824.1.1. Methods

824.1.1.1. fromString

fromString()

Create date-based header from string

Parameters:string
Return type:AbstractDate
Throws :ExceptionInvalidArgumentException

824.1.1.2. setDateFormat

setDateFormat()

Set date output format

Parameters:int
Throws ExceptionInvalidArgumentException:
 

824.1.1.3. getDateFormat

getDateFormat()

Return current date output format

Return type:string

824.1.1.4. setDate

setDate()

Set the date for this header, this can be a string or an instance of DateTime

Parameters:string|DateTime
Return type:AbstractDate
Throws :ExceptionInvalidArgumentException

824.1.1.5. getDate

getDate()

Return date for this header

Return type:string

824.1.1.6. date

date()

Return date for this header as an instance of DateTime

Return type:DateTime

824.1.1.7. compareTo

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.

Parameters:string|DateTime
Return type:int
Throws :ExceptionInvalidArgumentException

824.1.1.8. getFieldValue

getFieldValue()

Get header value as formatted date

Return type:string

824.1.1.9. toString

toString()

Return header line

Return type:string

824.1.1.10. __toString

__toString()

Allow casting to string

Return type:string

824.1.2. Constants

824.1.2.1. DATE_RFC1123

Date formats according to RFC 2616

824.1.2.2. DATE_RFC1036

824.1.2.3. DATE_ANSIC