Req #41187 [Opn->Wfx]: DateTime::setDefaultFormat for standard __toString() output of DateTime objects
Edit report at https://bugs.php.net/bug.php?id=41187&edit=1
ID: 41187
Updated by: derick@php.net
Reported by: r dot korving at xit dot nl
Summary: DateTime::setDefaultFormat for standard __toString()
output of DateTime objects
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: Date/time related
Operating System: Any
PHP Version: 5.2.2RC1
Block user comment: N
Private report: N
New Comment:
This is not something we will add, as it's going to be impossible to decide a format. If you
want __toString to work, create an inherited class that implements __toString with you format of
choice.
Previous Comments:
------------------------------------------------------------------------
[2009-09-08 07:42:33] grodny at oneclick dot sk
This would be nice to implement at least into 5.3 version.
------------------------------------------------------------------------
[2007-04-25 15:00:31] r dot korving at xit dot nl
Description:
------------
it would be nice if a static function DateTime::setDefaultFormat() was added to the DateTime class,
which can set a default output format which can be used by DateTime's __toString() - which is
also currently non-existing.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=41187&edit=1
Thread (3 messages)