Doc #69380 [NEW]: Insufficient "Date Format" example in online documentation
| From: | php at christian-stuedemann dot de | Date: | Sun, 05 Apr 2015 20:07:54 +0000 |
| Subject: | Doc #69380 [NEW]: Insufficient "Date Format" example in online documentation | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-12105@lists.php.net to get a copy of this message | ||
From: php at christian-stuedemann dot de
Operating system: all
PHP version: 5.6.8RC1
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Insufficient "Date Format" example in online documentation
Description:
------------
---
From manual page: http://www.php.net/datetime.formats.date
---
In "Localized Notations" the 7th line says >>Day, month and two digit
year, with dots or tabs dd [.\t] mm "." yy "30.6.08",
"22\t12\t78"<<
The last example "22\t12\t78" does not match to the RegExp and is not
accepted by the DateTime constructor (which is correct, but the example
is not). The second tab must be a dot to meet the RegExp: "22\t12.78"
Implementation seems to be correct, but documentation/example must be
maintained.
Test script:
---------------
function testDateTimeExample() {
$mustBeValid = new DateTime("22\t12.78");
try {
$isInvalid = new DateTime("22\t12\t78");
}catch(Exception $e){
// log $e
}
}
--
Edit bug report at https://bugs.php.net/bug.php?id=69380&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69380&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69380&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69380&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69380&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69380&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69380&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69380&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69380&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69380&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69380&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69380&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69380&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69380&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69380&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69380&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69380&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69380&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69380&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69380&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69380&r=mysqlcfg