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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
6 + 43 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Apr 24 03:01:29 2024 UTC