PHP DateTimedoes not handle incomplete dates.
DateTime::createFromFormat('Y-m', '2011-07')It is giving DateTime, which has 2011, 7 month and day, hour, minute and second are taken from the current time (at the moment I write this 2011-07-31 18:05:47.
, DateTime::createFromFormat('Y-m', '1998-06') DateTime, 1998, 6, , , ββ, . 31 - , 1998-07-01 18:05:47 (31 1 ).
3 , 0 30 .
2001-08 1998-07 31- , . , , .
, , "Y-m-d H:i:s" "-01 00:00:00" , , createFromFormat, DateTime .