#48495 [Opn->Bgs]: date calulates wrong nr of days
| From: | derick@php.net | Date: | Mon, 08 Jun 2009 14:16:31 +0000 |
| Subject: | #48495 [Opn->Bgs]: date calulates wrong nr of days | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-138106@lists.php.net to get a copy of this message | ||
ID: 48495
Updated by: derick@php.net
Reported By: office at codejungle dot org
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Ubuntu
PHP Version: 5.2.9
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 docs say clearly:
z The day of the year (starting from 0) 0 through 365
Previous Comments:
------------------------------------------------------------------------
[2009-06-08 14:11:59] office at codejungle dot org
Description:
------------
It seems date counts the days of a given year wrong.
Reproduce code:
---------------
<?
$mk=mktime(0, 0, 0, 1, 1, date('Y'));
$dayofyear = date("z", $mk);
echo $dayofyear;
?>
Expected result:
----------------
1
Actual result:
--------------
0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48495&edit=1