Edit report at http://bugs.php.net/bug.php?id=51376&edit=1
ID: 51376 User updated by: george at shoutbomb dot com Reported by: george at shoutbomb dot com Summary: date_parse_from_format no leading zero Status: Bogus -Type: Bug +Type: Documentation Problem Package: Date/time related Operating System: Windows PHP Version: 5.3.2 New Comment: I re-read http://us.php.net/manual/en/function.date-parse-from-format.php and there is no mention of parsing as 'integer'. If the function is accepting the "Format accepted by date() with some extras" that it should obey the formatting. Previous Comments: ------------------------------------------------------------------------ [2010-03-24 10:01:04] [email protected] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php They are parsed and stored as integers, not as strings. ------------------------------------------------------------------------ [2010-03-24 09:41:47] george at shoutbomb dot com Description: ------------ date_parse_from_format("Ymd","20100323") returns... no leading zero in the month Test script: --------------- <?php print_r(date_parse_from_format("Ymd","20100323")); ?> Expected result: ---------------- Array ( [year] => 2010 [month] => 03 [day] => 23 [hour] => [minute] => [second] => [fraction] => [warning_count] => 0 [warnings] => Array ( ) [error_count] => 0 [errors] => Array ( ) [is_localtime] => ) Actual result: -------------- Array ( [year] => 2010 [month] => 3 [day] => 23 [hour] => [minute] => [second] => [fraction] => [warning_count] => 0 [warnings] => Array ( ) [error_count] => 0 [errors] => Array ( ) [is_localtime] => ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51376&edit=1
