Doc #75714 [Opn->Nab]: Date format Day is J but Example 4 use d

From: Date: Wed, 20 Dec 2017 19:09:08 +0000
Subject: Doc #75714 [Opn->Nab]: Date format Day is J but Example 4 use d
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15300@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75714&edit=1 ID: 75714 Updated by: requinix@php.net Reported by: nicoesiea at gmail dot com Summary: Date format Day is J but Example 4 use d -Status: Open +Status: Not a bug Type: Documentation Problem -Package: Documentation problem +Package: Date/time related PHP Version: 7.2.0 Block user comment: N Private report: N New Comment: ...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. Previous Comments: ------------------------------------------------------------------------ [2017-12-20 18:53:30] 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- ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75714&edit=1

« previous php.doc.bugs (#15300) next »