ID:               33957
 Updated by:       [EMAIL PROTECTED]
 Reported By:      paul at stunning-stuff dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: Windows XP Pro
 PHP Version:      5.1.0b3
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2005-08-02 03:27:51] paul at stunning-stuff dot com

Description:
------------
Hi,

While I was writing my own getWeekNumber method I discovered
gmdate('W') and date('W') both return incorrect results for the year
1992 and 2020. Both years end on a thursday and both are leap years.
I'm guessing that this is exactly the reason they return incorrect
results :).

Expected result:
The last 4 days in 1992 and 2020 belong to week 53 of those years
according to ISO 8601 rules.

Actual result:
gmdate('W') and date('W') think the last 4 days of 1992 and 2020 belong
to week 1 of the following year.

I only had the time to test these two years, but I expect that PHP will
return the incorrect week number for every leap year that ends with a
thursday.

Thanks,

Paul van der Maas
---
www.stunning-stuff.com



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33957&edit=1

Reply via email to