Bug #51987 [Opn->Bgs]: Datetime fails to parse an ISO 8601 ordinal date (extended format)
| From: | salathe@php.net | Date: | Thu, 03 Jun 2010 12:36:21 +0000 |
| Subject: | Bug #51987 [Opn->Bgs]: Datetime fails to parse an ISO 8601 ordinal date (extended format) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151052@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51987&edit=1
ID: 51987
Updated by: salathe@php.net
Reported by: jbondc at openmv dot com
Summary: Datetime fails to parse an ISO 8601 ordinal date
(extended format)
-Status: Open
+Status: Bogus
Type: Bug
Package: Date/time related
Operating System: FreeBSD
PHP Version: 5.2.13
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Currently only YYdoy and YY.doy are supported. Adding in YY-doy would
conflict
with existing support for YY-mm. See http://php.net/datetime.formats for
details
of what is currently available.
(Key: YY = four-digit year, doy = day of year, mm = month number.)
Previous Comments:
------------------------------------------------------------------------
[2010-06-03 13:55:51] jbondc at openmv dot com
Description:
------------
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Dec 30 2009 15:41:26)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend
Technologies
Test script:
---------------
// Ordinal date â 12 April 1985
$d1 = new Datetime('1985102');
// OK
$d2 = new Datetime('1985-102');
// Exception: DateTime::__construct(): Failed to parse time string
(1985-102) at position 7 (2): Unexpected character
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51987&edit=1