php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73856 date in format y/w returned wrong
Submitted: 2017-01-03 17:22 UTC Modified: 2017-01-03 18:38 UTC
From: vlad dot nasta at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Date/time related
PHP Version: 7.1.0 OS: linux
Private report: No CVE-ID: None
 [2017-01-03 17:22 UTC] vlad dot nasta at gmail dot com
Description:
------------
date("Y/W",strtotime("Sunday -8 days")); returns 2016/52
date("Y/W",strtotime("Sunday -7 days")); returns 2017/52


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-03 18:38 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Package: *General Issues +Package: Date/time related -Assigned To: +Assigned To: cmb
 [2017-01-03 18:38 UTC] cmb@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

Don't use `Y` in combination with `W`, but rather `o`, see
<https://3v4l.org/iXgn7>.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 03:02:51 2024 UTC