Doc #68944 [Com]: strftime %G problem with 31-12-2013
| From: | gabri dot ns at gmail dot com | Date: | Thu, 29 Jan 2015 14:04:06 +0000 |
| Subject: | Doc #68944 [Com]: strftime %G problem with 31-12-2013 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11898@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68944&edit=1
ID: 68944
Comment by: gabri dot ns at gmail dot com
Reported by: kesavan dot krishnan at krds dot fr
Summary: strftime %G problem with 31-12-2013
Status: Open
Type: Documentation Problem
Package: Scripting Engine problem
Operating System: ubuntu 13.10
PHP Version: 5.4.37
Block user comment: N
Private report: N
New Comment:
please use %Y
%G, %g, %V, and %u is used for ISO8601 weekdays. please see the documentation of %V for more
information. http://php.net/manual/en/function.strftime.php
Previous Comments:
------------------------------------------------------------------------
[2015-01-29 13:40:30] kesavan dot krishnan at krds dot fr
Description:
------------
---
From manual page: http://www.php.net/faq
---
In php 5.4.35 i user strftime %A %e %B %G to get the date information.But if am passing date
31-12-2011, 31-12-2012, 31-12-2013, 31-12-2014 it return the year number+1.For exmp.if year is 2013
it return 2014.
Test script:
---------------
$mytime = new DateTime('2012-12-31');
echo strftime('%A %e %B %G', $mytime->getTimestamp());
Expected result:
----------------
Monday 31 December 2012
Actual result:
--------------
Monday 31 December 2013
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68944&edit=1