Class Date
Helper class for standard HTTP date formats.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Date
Methods summary
public
|
#
__construct( integer|string $dateTime = null )
Initialised a new instance with an optional timestamp. |
public static
|
|
public static
|
|
public
string
|
#
format( string $format )
Returns a string representing the stored UNIX timestamp in the requested format. |
public
string
|
#
rfc1123( )
Returns the RFC1123 representation of the stored UNIX timestamp. A RFC 1123 formatted timestamp is the preferred Internet standard and must be used in HTTP/1.1 headers. |
public
string
|
#
rfc822( )
Returns the RFC 822 representation of the stored UNIX timestamp. A RFC 822 formatted timestamp is preferred as an Internet standard and commonly used in HTTP headers. Note, that HTTP/1.1 clients and servers must support this representation but must only generate RFC 1123 timestamps. |
public
string
|
#
rfc850( )
Returns the RFC 850 representation of the stored UNIX timestamp. A RFC 850 formatted timestamp is now considered obsolete and has been commonly used in HTTP headers. Note, that HTTP/1.1 clients and servers must support this representation but must only generate RFC 1123 timestamps. |
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
chain()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
hash()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
string |
Zero
RFC 1123 (HTTP/1.1-conform) date constant for the UNIX timestamp zero. |
#
'Thu, 01 Jan 1970 00:00:00 GMT'
|
string |
ATOM
|
#
'Y-m-d\TH:i:sP'
|
string |
COOKIE
Cookie timestamp format. |
#
'l, d-M-y H:i:s T'
|
string |
ISO8601
ISO-8601 timestamp format. |
#
'c'
|
string |
RFC822
RFC 822 timestamp format (includes timezone). |
#
'D, d M y H:i:s O'
|
string |
RFC850
RFC 850 timestamp format (includes timezone). |
#
'l, d-M-y H:i:s T'
|
string |
RFC1036
RFC 1036 timestamp format (includes timezone). |
#
'D, d M y H:i:s O'
|
string |
RFC1123
RFC 1123 timestamp format (includes timezone) for HTTP/1.1. |
#
'D, d M Y H:i:s O'
|
string |
RFC2822
RFC 2822 timestamp format. |
#
'r'
|
string |
RFC3339
RFC 3339 timestamp format. |
#
'Y-m-d\TH:i:sP'
|
string |
RSS
|
#
'D, d M Y H:i:s O'
|
string |
W3C
W3C timestamp format. |
#
'Y-m-d\TH:i:sP'
|
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
protected
integer
|
$_v_unixTimestamp
UNIX timestamp of date. |
Magic properties
public read-only
string
|
$rfc1123
See |
public read-only
string
|
$rfc822
See |
public read-only
string
|
$rfc850
See |
public read-only
integer
|
$unixTimestamp
UNIX timestamp of date. |