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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vlad dot nasta at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 11:01:28 2025 UTC