#45483 [Com]: Add an era designater to DateTime methods when formatting or parsing dates
| From: | tj at systisoft dot com | Date: | Tue, 15 Jul 2008 11:47:35 +0000 |
| Subject: | #45483 [Com]: Add an era designater to DateTime methods when formatting or parsing dates | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-126754@lists.php.net to get a copy of this message | ||
ID: 45483
Comment by: tj at systisoft dot com
Reported By: tj at systisoft dot com
Status: Assigned
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 5.3CVS-2008-07-11 (CVS)
Assigned To: derick
New Comment:
There should also be a possibility to format a year without the sign,
because if you format with 'Y' you will get something like:
-2000 BC
This can either be done by an new format char for unsigned year or that
the 'Y' format is omitting the sign when a format char for the era
designator is present.
Previous Comments:
------------------------------------------------------------------------
[2008-07-11 10:18:11] tj at systisoft dot com
Description:
------------
It is currently not possible to specify an era designator in a format
when parsing or formatting dates with DateTime::createFromFormat or
DateTime::format.
An era designater would be BC or AD as in 1/1/0200 BC or 1/1/2004 AD.
I don't know which format char would be good since 'G' which is used in
some other format patterns as era designator seems to be already taken.
Reproduce code:
---------------
N/A
Expected result:
----------------
N/A
Actual result:
--------------
N/A
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45483&edit=1