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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 16:01:29 2024 UTC