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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Thu May 02 19:01:29 2024 UTC