(PHP 5 >= 5.2.0, PHP 7)
This class behaves the same as DateTimeImmutable except objects are modified itself when modification methods such as DateTime::modify() are called.
$format
, string $datetime
[, DateTimeZone $timezone
] ) : DateTime
Version | Description |
---|---|
7.2.0 | The class constants of DateTime are now defined on DateTimeInterface. |
7.0.0 | Added constants: DATE_RFC3339_EXTENDED and DateTime::RFC3339_EXTENDED. |
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 == ).
|