Bug #71393 [NEW]: Bug with Date('W', $date) function usage
From: barret91 at hotmail dot com
Operating system: Ubuntu 14.04.3 LTS
PHP version: 5.5.31
Package: *General Issues
Bug Type: Bug
Bug description:Bug with Date('W', $date) function usage
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 bug report at https://bugs.php.net/bug.php?id=71393&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71393&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71393&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71393&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71393&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71393&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71393&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71393&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71393&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71393&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71393&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71393&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71393&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71393&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71393&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71393&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71393&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71393&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71393&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71393&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71393&r=mysqlcfg
Thread (2 messages)
- barret91 at hotmail dot com