Doc #66143 [Opn->Nab]: Wrong documentation on "Time Formats"
| From: | frozenfire@php.net | Date: | Tue, 26 Nov 2013 07:20:53 +0000 |
| Subject: | Doc #66143 [Opn->Nab]: Wrong documentation on "Time Formats" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10639@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66143&edit=1
ID: 66143
Updated by: frozenfire@php.net
Reported by: k dot kennypu at gmail dot com
Summary: Wrong documentation on "Time Formats"
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
Operating System: N/A
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
It is resulting in this behaviour because you are passing a series of formatting codes to the date
function in the form of "meridian".
Previous Comments:
------------------------------------------------------------------------
[2013-11-22 04:47:16] gabri dot ns at gmail dot com
those page are for explaining what kind of time format did PHP understand. To use "date"
function, please read http://php.net/date
------------------------------------------------------------------------
[2013-11-22 02:21:10] k dot kennypu at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/datetime.formats.time
---
Wrong documentation for displaying AM/PM.
In Documentation:
"Description" : "meridian"
"Examples" : "A.m, pM, am."
Expected Behavior when use in use in code:
"time is: 00:00 AM/PM"
Actual Behavior:
"time is: 00:00 00UTCMon, XX Nov XXXX 00:00:00 + 0000000..00pm11"
Fix:
Documentation should say "Description" : "A/a", not meridian, it does not do
what it says it does.
Test script:
---------------
echo "time is: " . date("h:i meridian", time() );
//real code is echo "time is: " . date("h:i A", time() );
Expected result:
----------------
"time is: 00:00 AM/PM"
Actual result:
--------------
"time is: 00:00 00UTCMon, XX Nov XXXX 00:00:00 + 0000000..00pm11"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66143&edit=1