php / php-langspec

PHP Language Specification
http://www.php.net
Other
2.3k stars 271 forks source link

DateTime::createFromFormat and date() should support same format letters #219

Closed stenno closed 6 years ago

stenno commented 6 years ago

Differences in format letters (specifically "v") make the DateTime format constants unusable for createFromFormat.

Example: DATE_RFC3339_EXTENDED has the value "Y-m-d\TH:i:s.vP". This predefined format will work for date(), but not for DateTime::createFromFormat, as milliseconds require the format symbol "v".

createFromFormat should support "v" as milliseconds symbol to support the DateTime format constants.

Closing the issue, because it is already addressed here https://bugs.php.net/bug.php?id=76009