|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75714 Date format Day is J but Example 4 use d
Submitted: 2017-12-20 18:53 UTC Modified: 2017-12-20 19:09 UTC
From: nicoesiea at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 7.2.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nicoesiea at gmail dot com
New email:
PHP Version: OS:


 [2017-12-20 18:53 UTC] nicoesiea at gmail dot com
From manual page:
The Date format for day is j, but the doc use d and the result is empty

Expected result:
$today = date("Y-m-j H:i:s");                   // 2001-03-10

Actual result:
$today = date("Y-m-d H:i:s");                   // 2001-03-


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-20 19:09 UTC]
-Status: Open +Status: Not a bug -Package: Documentation problem +Package: Date/time related
 [2017-12-20 19:09 UTC] 'd' is the day number with leading zeroes (while 'j' does not have leading zeroes) so "Y-m-d" is correct for the example.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 08:01:29 2024 UTC