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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
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 20:01:32 2024 UTC