php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39912 date('W') returns wrong week number for some dates
Submitted: 2006-12-20 20:33 UTC Modified: 2006-12-20 22:36 UTC
From: pkus at epf dot pl Assigned: derick (profile)
Status: Not a bug Package: Date/time related
PHP Version: 5.2.0 OS: windows xp
Private report: No CVE-ID: None
 [2006-12-20 20:33 UTC] pkus at epf dot pl
Description:
------------
bug was reported earlier and closed
Bug #33957  	gmdate('W')/date('W') sometimes returns wrong week number.



Reproduce code:
---------------
print_r(date('W', mktime(0,0,0,12,31,2007)));
//returns 01 but should return 53

Expected result:
----------------
//returns 01 but should return 53

Actual result:
--------------
01

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-20 22:36 UTC] derick@php.net
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

Please read the description of "ISO Week date" at http://en.wikipedia.org/wiki/ISO_week_date
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 07:01:31 2024 UTC