Bug #53712 [Opn]: DateTime::createFromFormat using format ('W') doesn't work
| From: | derick@php.net | Date: | Tue, 11 Jan 2011 14:51:28 +0000 |
| Subject: | Bug #53712 [Opn]: DateTime::createFromFormat using format ('W') doesn't work | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5778@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53712&edit=1
ID: 53712
Updated by: derick@php.net
Reported by: mpchanzy at proxecom dot fr
Summary: DateTime::createFromFormat using format ('W')
doesn't work
Status: Open
Type: Bug
-Package: Unknown/Other Function
+Package: Translation problem
Operating System: XP Pro
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
"W" is not part of that list at allâit is not supported. The
documentation also states
http://uk.php.net/manual/en/datetime.createfromformat.php:
The format that the passed in string should be in. See the formatting
options below. In *most cases*, the same letters as for the date() can
be used.
Perhaps you're looking at an outdated translation of the manual? It
looks that the French version of the manual is indeed outdated.
Previous Comments:
------------------------------------------------------------------------
[2011-01-11 11:45:24] mpchanzy at proxecom dot fr
I just changed the title to make it more explicit
------------------------------------------------------------------------
[2011-01-11 11:35:29] mpchanzy at proxecom dot fr
Description:
------------
---
From manual page: http://www.php.net/datetime.createfromformat#Liste
de
paramètres
---
DateTime::createFromFormat('W','1')
returns false when it should probably return the date of the first week
of the year.
'W' is a date() compatible format
Test script:
---------------
$date = DateTime::createFromFormat('W','1');
Expected result:
----------------
it should return something like this:
public 'date' => string '2011-01-03 10:17:40' (length=19)
public 'timezone_type' => int 3
public 'timezone' => string 'UTC' (length=3)
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53712&edit=1