(PHP 5 >= 5.2.0)
Representation of date and time.
$format
, string $time
[, DateTimeZone $timezone
] )DateTime::ATOM
DATE_ATOM
DATE_COOKIE
DateTime::ISO8601
DATE_ISO8601
DateTime::RFC822
DATE_RFC822
DateTime::RFC850
DATE_RFC850
DateTime::RFC1036
DATE_RFC1036
DateTime::RFC1123
DATE_RFC1123
DateTime::RFC2822
DATE_RFC2822
DateTime::RFC3339
DATE_RFC3339
DATE_ATOM
(since PHP 5.1.3)
DateTime::RSS
DATE_RSS
DateTime::W3C
DATE_W3C
Versiunea | Descriere |
---|---|
5.5.0 | The class now implements DateTimeInterface. |
5.4.24 | The COOKIE constant was changed to reflect RFC 1036 using a four digit year rather than a two digit year (RFC 850) as prior versions. |
5.2.2 | DateTime object comparison with the comparison operators changed to work as expected. Previously, all DateTime objects were considered equal (using ==). |