|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-05-31 15:38 UTC] derick@php.net
-Status: Open
+Status: Not a bug
[2017-05-31 15:38 UTC] derick@php.net
[2017-05-31 15:45 UTC] raul at reyes dot solutions
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 12:00:01 2025 UTC |
Description: ------------ Seems to default all dates to 31. if trying to create February of 2018 for example it defaults to March 3rd. DateTime::createFromFormat('my',"0218") sets the date to 2018-03-03. I would think the correct behavior is setting the date to 01 (or maybe the last day 't') Test script: --------------- $date = DateTime::createFromFormat('my',"0218"); echo $date->format('Y-m-t') . " when expecting 2018-02-01"; Expected result: ---------------- 2018-02-01 Actual result: -------------- 2018-03-03