|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48105 The number of weeks in 2009 are 52, not 53
Submitted: 2009-04-29 10:57 UTC Modified: 2009-04-29 11:02 UTC
From: migue dot m at gmail dot com Assigned:
Status: Not a bug Package: Calendar related
PHP Version: 5.2.9 OS: Windows XP SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: migue dot m at gmail dot com
New email:
PHP Version: OS:


 [2009-04-29 10:57 UTC] migue dot m at gmail dot com
I use this code to calculate the week number for December 28 of 2009:

strftime("%V", mktime(12,0,0,12,28,$x));

This function have to return "1" but it returns "53" and the 2009 year hasn't 53 weeks.

I also tried other code with the same results:

date('W', strtotime("December 28, $x"));


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-29 11:02 UTC] migue dot m at gmail dot com
I'm stupid, sorry, the ISO-8601 say that 2009 HAVE 53 weeks.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Mar 23 15:03:46 2023 UTC