Req #53712 [Opn->Wfx]: DateTime::createFromFormat using format ('W') doesn't work

From: Date: Thu, 12 Jan 2017 19:37:55 +0000
Subject: Req #53712 [Opn->Wfx]: DateTime::createFromFormat using format ('W') doesn't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206574@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53712&edit=1 ID: 53712 Updated by: heiglandreas@php.net Reported by: mpchanzy at proxecom dot fr Summary: DateTime::createFromFormat using format ('W') doesn't work -Status: Open +Status: Wont fix Type: Feature/Change Request Package: Date/time related Operating System: XP Pro PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: Thank you for your suggestion. As the previous comment suggests there is a way to solve this issue, so I'm closing this. Previous Comments: ------------------------------------------------------------------------ [2015-06-24 10:36:29] simon dot lindhen at hotmail dot com To create a DateTime from a week you can use: http://php.net/manual/en/datetime.setisodate.php ------------------------------------------------------------------------ [2011-01-26 21:46:57] philip@php.net Marking as a datetime feature request. ------------------------------------------------------------------------ [2011-01-12 18:57:54] altrozero at gmail dot com This is probably more of a feature request than a bug as 'W' isn't listed in the documentation for DateTime::createFromFormat neither are a few other characters that are supported by date. You may as well just use the date() function if you wish to use 'W' ------------------------------------------------------------------------ [2011-01-11 15:51:28] derick@php.net "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. ------------------------------------------------------------------------ [2011-01-11 11:45:24] mpchanzy at proxecom dot fr I just changed the title to make it more explicit ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=53712 -- Edit this bug report at https://bugs.php.net/bug.php?id=53712&edit=1

« previous php.bugs (#206574) next »