Req #45173 [Opn->Wfx]: strftime formatting on datetime objects
| From: | derick@php.net | Date: | Fri, 13 May 2022 10:09:16 +0000 |
| Subject: | Req #45173 [Opn->Wfx]: strftime formatting on datetime objects | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-241475@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=45173&edit=1
ID: 45173
Updated by: derick@php.net
Reported by: peter dot bex at solide-ict dot nl
Summary: strftime formatting on datetime objects
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: Date/time related
Operating System: N/A
PHP Version: 5.2.6
Block user comment: N
Private report: N
New Comment:
This won't be fixed. The now new Intl::DateFormatter based on ICU should be used instead of
strftime.
Previous Comments:
------------------------------------------------------------------------
[2020-07-28 21:38:05] mail at gh01 dot de
Instead of adding a new method to the datetime classes, maybe the strftime function could accept
datetime objects as second param?
------------------------------------------------------------------------
[2008-06-04 12:23:58] peter dot bex at solide-ict dot nl
Description:
------------
1) The regular 'format' method on datetime objects only accepts date() syntax, which is
severely limited in what you can do with it. The strftime syntax is more powerful.
2) As discussed in bug 45167, there's no way to call strftime using datetime object values
reliably, because there are ways to create datetime objects with bogus timezone objects (objects
which can not be recreated nor can their names be passed to date_default_timezone_set).
Because of 1) and 2), there is a need to get strftime integrated in the datetime class.
Reproduce code:
---------------
N/A
Expected result:
----------------
N/A
Actual result:
--------------
N/A
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=45173&edit=1