Doc #69380 [Asn->Csd]: Insufficient "Date Format" example in online documentation
| From: | salathe@php.net | Date: | Thu, 19 May 2016 21:36:14 +0000 |
| Subject: | Doc #69380 [Asn->Csd]: Insufficient "Date Format" example in online documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13458@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69380&edit=1
ID: 69380
Updated by: salathe@php.net
Reported by: php at christian-stuedemann dot de
Summary: Insufficient "Date Format" example in online
documentation
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: all
PHP Version: 5.6.8RC1
Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2016-05-19 21:35:51] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=339186
Log: fix invalid date format examples (doc #69380)
------------------------------------------------------------------------
[2015-04-05 20:07:52] php at christian-stuedemann dot de
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 this bug report at https://bugs.php.net/bug.php?id=69380&edit=1