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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pkus at epf dot pl
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 11:01:31 2025 UTC