DateTimeInterface
interface DateTimeInterface (View source)
Constants
ATOM
Since: 7.2
|
|
COOKIE
Since: 7.2
|
|
deprecated ISO8601
Since: 7.2
|
This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead. |
ISO8601_EXPANDED
Since: 8.2
|
|
RFC822
Since: 7.2
|
|
RFC850
Since: 7.2
|
|
RFC1036
Since: 7.2
|
|
RFC1123
Since: 7.2
|
|
RFC2822
Since: 7.2
|
|
RFC3339
Since: 7.2
|
|
RFC3339_EXTENDED
Since: 7.2
|
|
RFC7231
Since: 7.2
|
|
RSS
Since: 7.2
|
|
W3C
Since: 7.2
|
|
Methods
(PHP 5 >=5.5.0)
Returns the difference between two DateTime objects
(PHP 5 >=5.5.0)
Returns date formatted according to given format
(PHP 5 >=5.5.0)
Returns the timezone offset
(PHP 5 >=5.5.0)
Gets the Unix timestamp
(PHP 5 >=5.5.0)
Return time zone relative to given DateTime
(PHP 5 >=5.5.0)
The __wakeup handler
No description
No description
No description
No description
Details
DateInterval
diff(DateTimeInterface $targetObject, bool $absolute = false)
(PHP 5 >=5.5.0)
Returns the difference between two DateTime objects
string
format(string $format)
(PHP 5 >=5.5.0)
Returns date formatted according to given format
int
getOffset()
(PHP 5 >=5.5.0)
Returns the timezone offset
int
getTimestamp()
(PHP 5 >=5.5.0)
Gets the Unix timestamp
DateTimeZone|false
getTimezone()
(PHP 5 >=5.5.0)
Return time zone relative to given DateTime
void
__wakeup()
(PHP 5 >=5.5.0)
The __wakeup handler
array
__serialize()
No description
void
__unserialize(array $data)
No description
int
getMicrosecond()
No description
setMicrosecond()
No description