Req #51987 [Opn]: Datetime fails to parse an ISO 8601 ordinal date (extended format)

From: Date: Sat, 11 Mar 2017 21:37:30 +0000
Subject: Req #51987 [Opn]: 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-207795@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51987&edit=1 ID: 51987 Updated by: heiglandreas@php.net Reported by: jbondc at openmv dot com Summary: Datetime fails to parse an ISO 8601 ordinal date (extended format) Status: Open Type: Feature/Change Request Package: Date/time related Operating System: FreeBSD PHP Version: 5.2.13 -Assigned To: +Assigned To: derick Block user comment: N Private report: N New Comment: @derick Any chance we can merge this patch or close this as "Wont fix"? Previous Comments: ------------------------------------------------------------------------ [2011-01-26 22:49:17] jbondc at openmv dot com This patch needs: re2c -d -b -o ext/date/lib/parse_date.c ext/date/lib/parse_date.re It also fixes tests that were failing in trunk. I changed the behavior of timelib_parse_from_format() to always initialized seconds, minutes, hours to 0 if they are not set. ------------------------------------------------------------------------ [2010-06-03 15:38:31] salathe@php.net Forgive my initial hastiness, I overlooked the fact that doy should always be 3- digits in length. Sorry!! ------------------------------------------------------------------------ [2010-06-03 15:04:19] derick@php.net It's a feature request though, *but* before we add it we must be certain that it doesn't conflict. ------------------------------------------------------------------------ [2010-06-03 14:55:14] jbondc at openmv dot com Please leave this bug open, I will look at submitting a patch. There is no reason not to support: $d2 = new Datetime('1985-001'); $d2 = new Datetime('1985-002'); ... $d2 = new Datetime('1985-365'); AND $d2 = new Datetime('1985-01'); $d2 = new Datetime('1985-12'); ------------------------------------------------------------------------ [2010-06-03 14:36:21] salathe@php.net 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.) ------------------------------------------------------------------------ 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=51987 -- Edit this bug report at https://bugs.php.net/bug.php?id=51987&edit=1

« previous php.bugs (#207795) next »