[php-src] Issue #12088: DateTime::createFromFormat() parse incorrectly 'my' formatted month/year string

From: Date: Thu, 31 Aug 2023 09:05:21 +0000
Subject: [php-src] Issue #12088: DateTime::createFromFormat() parse incorrectly 'my' formatted month/year string
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245300@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12088 Author: bpresles ### Description The following code: ```php <?php $dateTime = \DateTime::createFromFormat('my', '0224'); echo $dateTime->format('m'); ``` Resulted in this output: ``` 03 ``` But I expected this output instead: ``` 02 ``` ### PHP Version PHP 8.2.9 ### Operating System Ubuntu 22.04.3 LTS

« previous php.bugs (#245300) next »