Bug #52770 [Com]: Documentation for date() has wrong range for 'z'

From: Date: Fri, 03 Sep 2010 19:32:42 +0000
Subject: Bug #52770 [Com]: Documentation for date() has wrong range for 'z'
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4967@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52770&edit=1 ID: 52770 Comment by: niel dot archer at blueyonder dot co dot uk Reported by: guy dot paddock at redbottledesign dot com Summary: Documentation for date() has wrong range for 'z' Status: Bogus Type: Bug Package: Documentation problem Operating System: N/A PHP Version: Irrelevant Block user comment: N New Comment: You're forgetting leap years where it can have 365 days, hence the range 0 to 365. Previous Comments: ------------------------------------------------------------------------ [2010-09-03 18:24:53] rasmus@php.net Leap years have 366 days, so 0-365 is correct. ------------------------------------------------------------------------ [2010-09-03 18:18:41] guy dot paddock at redbottledesign dot com Description: ------------ The documentation for the date() function states that the format character 'z' will produce a value in the range 0 to 365. Technically, this is incorrect -- since the format character 'z' is the day of the year starting from 0, the maximum value it can have is 364, not 365. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52770&edit=1

« previous php.doc.bugs (#4967) next »