#50619 [Opn->Bgs]: date change year
| From: | derick@php.net | Date: | Thu, 31 Dec 2009 12:15:18 +0000 |
| Subject: | #50619 [Opn->Bgs]: date change year | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146237@lists.php.net to get a copy of this message | ||
ID: 50619
Updated by: derick@php.net
Reported By: klevisi at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: linux
PHP Version: 5.2.12
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
The "o" specifier is for the "ISO Year", see
http://en.wikipedia.org/wiki/ISO_year#Relation_with_the_Gregorian_calendar
for what that means. You probably want to use "Y" instead.
Previous Comments:
------------------------------------------------------------------------
[2009-12-31 11:26:58] klevisi at gmail dot com
Description:
------------
When the year changes it displays not the expected results
Reproduce code:
---------------
<?php
for($i=0; $i<7; $i++) {
echo date("o-m-d", mktime() + $i * 86400);
echo '<br />';
}
?>
Expected result:
----------------
2009-12-31
2010-01-01
2010-01-02
2010-01-03
2010-01-04
2010-01-05
2010-01-06
Actual result:
--------------
2009-12-31
2009-01-01
2009-01-02
2009-01-03
2010-01-04
2010-01-05
2010-01-06
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50619&edit=1