Bug #71393 [Opn->Nab]: Bug with Date('W', $date) function usage
Edit report at https://bugs.php.net/bug.php?id=71393&edit=1
ID: 71393
Updated by: requinix@php.net
Reported by: barret91 at hotmail dot com
Summary: Bug with Date('W', $date) function usage
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Ubuntu 14.04.3 LTS
PHP Version: 5.5.31
Block user comment: N
Private report: N
New Comment:
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
http://php.net/manual/en/function.date.php
> W ISO-8601 week number of year, weeks starting on Monday
Previous Comments:
------------------------------------------------------------------------
[2016-01-16 21:21:32] barret91 at hotmail dot com
Description:
------------
In this year (2016) date('W', $date); is counting less 1
Test script:
---------------
$today= date("Y-m-d");
$weekNumber = date("W",strtotime($today));
echo $weekNumber;
Expected result:
----------------
It echoes "2" but should echo "3"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71393&edit=1
Thread (2 messages)