Bug #66403 [Nab]: datetime bug week add

From: Date: Fri, 03 Jan 2014 16:01:05 +0000
Subject: Bug #66403 [Nab]: datetime bug week add
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183566@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66403&edit=1

 ID:                 66403
 User updated by:    amaladossjoelshelley at gmail dot com
 Reported by:        amaladossjoelshelley at gmail dot com
 Summary:            datetime bug week add
 Status:             Not a bug
 Type:               Bug
 Package:            Date/time related
 Operating System:   windows
 PHP Version:        5.4.23
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[2014-01-03 14:43:01] 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 14:29:24] 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


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66403&edit=1


Thread (3 messages)

« previous php.bugs (#183566) next »