php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66403 datetime bug week add
Submitted: 2014-01-03 14:29 UTC Modified: 2014-01-03 16:01 UTC
From: amaladossjoelshelley at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.4.23 OS: windows
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: amaladossjoelshelley at gmail dot com
New email:
PHP Version: OS:

 

 [2014-01-03 14:29 UTC] amaladossjoelshelley at gmail dot com
Description:
------------
492013
502013
512013
522013
BUG --> 012013 Must be 01 2014 (Jan 2014)
022014
032014
042014
052014


$annexeDeb=DateTime::createFromFormat('d/m/Y',"03/12/2013"); // start date
 $annexeDeb->modify('+1 week');  

Expected result:
----------------
492013
502013
512013
522013
012014
022014
032014
042014
052014

Actual result:
--------------
492013
502013
512013
522013
012013
022014
032014
042014
052014

Patches

bugDateTimeModifyWeek (last revision 2014-01-03 14:31 UTC by amaladossjoelshelley at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-03 14:43 UTC] derick@php.net
-Status: Open +Status: Not a bug
 [2014-01-03 14:43 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is correct behaviour. The week number (W) is supposed to be used with the "o" specifier and not the "Y" one. See http://derickrethans.nl/iso-8601-weeks.html for more information.
 [2014-01-03 16:01 UTC] amaladossjoelshelley at gmail dot com
Yes just looked at my calender ! Of course a week can start on the month December 2013 and ends on the month of january for exemple...! TRUE Thanks for correcting me
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 17:00:01 2026 UTC