ID:               48495
 Updated by:       [email protected]
 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

Reply via email to