Doc #79181 [NEW]: Docpage miss 'v' format definition

From: Date: Tue, 28 Jan 2020 11:43:47 +0000
Subject: Doc #79181 [NEW]: Docpage miss 'v' format definition
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17228@lists.php.net to get a copy of this message
From: b dot davide4 at virgilio dot it Operating system: irrelevant PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Docpage miss 'v' format definition Description: ------------ --- From manual page: https://php.net/datetime.createfromformat --- On the page the format option 'v' is not documented: (It takes the milliseconds) Test script: --------------- $dates = [ 'short' => '20201112132455999', 'long' => '20201112132455999888' ]; $formats=[ 'u' => 'YmdHisu', 'v' => 'YmdHisv' ]; foreach ($dates as $dk => $d) foreach ($formats as $f ){ $v = DateTime::createFromFormat($f,$d); echo "result for ".$d." with format ".$f.' is: '; print_r( !is_a($v,'DateTime')? ['not-a-datetime'] : $v); } Expected result: ---------------- result for (short) 20201112132455999 with format YmdHisu is: DateTime Object ( [date] => 2020-11-12 13:24:55.999000 [timezone_type] => 3 [timezone] => UTC ) result for (short) 20201112132455999 with format YmdHisv is: DateTime Object ( [date] => 2020-11-12 13:24:55.999000 [timezone_type] => 3 [timezone] => UTC ) result for (long) 20201112132455999888 with format YmdHisu is: DateTime Object ( [date] => 2020-11-12 13:24:55.999888 [timezone_type] => 3 [timezone] => UTC ) result for (long) 20201112132455999888 with format YmdHisv is: Array ( [0] => not-a-datetime ) -- Edit bug report at https://bugs.php.net/bug.php?id=79181&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79181&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79181&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79181&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79181&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79181&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79181&r=support Expected behavior: https://bugs.php.net/fix.php?id=79181&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79181&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79181&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79181&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79181&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79181&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79181&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79181&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79181&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79181&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79181&r=mysqlcfg

« previous php.doc.bugs (#17228) next »