php.net |  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
 [2009-04-29 10:57 UTC] migue dot m at gmail dot com
Description:
------------
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"));


Patches

Pull Requests

History

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC