php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nicoesiea at gmail dot com
New email:
PHP Version: OS:

 

 [2017-12-20 18:53 UTC] nicoesiea at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.date
---
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-

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-20 19:09 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: Documentation problem +Package: Date/time related
 [2017-12-20 19:09 UTC] requinix@php.net
...no? '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: Fri Apr 19 12:01:27 2024 UTC