php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62391 format('W')
Submitted: 2012-06-22 04:11 UTC Modified: 2012-06-22 08:23 UTC
From: master dot zion at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.3Git-2012-06-22 (Git) OS: windows
Private report: No CVE-ID: None
 [2012-06-22 04:11 UTC] master dot zion at gmail dot com
Description:
------------
$td1 = new DateTime('01/01/2012');
echo $td1->format("W"); // 52 ???


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-22 08:23 UTC] cataphract@php.net
-Status: Open +Status: Not a bug
 [2012-06-22 08:23 UTC] cataphract@php.net
Not a bug. In general, Jan 1 is not in week 1. Week 1 is the first week that contains at least 4 days from that year, and for this purpose weeks are deemed to start on Mondays.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC