Edit report at http://bugs.php.net/bug.php?id=51472&edit=1
ID: 51472
Comment by: sjaillet at gmail dot com
Reported by: wmbr at cust dot in
Summary: DateTime::createFromFormat() does not accept 'W' or
'w' format specifier
Status: Assigned
Type: Bug
Package: Date/time related
Operating System: ubuntu
PHP Version: 5.3.2
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
This missing feature (of w at least) requires parsing the english
textual representation of days for localizing it. Obtaining an index
would be much more efficient !
Previous Comments:
------------------------------------------------------------------------
[2010-04-04 18:30:55] wmbr at cust dot in
Description:
------------
Although the documentation claims every "Format accepted by date()" is
accepted by DateTime::createFromFormat()
(http://www.php.net/manual/en/datetime.createfromformat.php), the
specifiers 'W' and 'w' are actually not.
So this is either a bug or a documentation-error.
Test script:
---------------
$mydate = DateTime::createFromFormat('W', '1');
print_r(DateTime::getLastErrors());
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51472&edit=1