php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #9988 Documentation has incorrect example for date()
Submitted: 2001-03-26 03:44 UTC Modified: 2001-04-07 01:32 UTC
From: jcarnahan at networq dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.4pl1 OS: N/A
Private report: No CVE-ID: None
 [2001-03-26 03:44 UTC] jcarnahan at networq dot com
The documentation for the date() function at:

http://www.php.net/manual/en/function.date.php

Has one example:

$today = date("D M j g:i:s T Y"); // Sat Mar 10 15:16:08 MST 2001

Note that it appears "g" has yeilded "15" ... This is incorrect:

g - hour, 12-hour format without leading zeros; i.e. "1" to "12" 

G - hour, 24-hour format without leading zeros; i.e. "0" to "23" 

That should either be a capital "G" in the date() function, or the example output should be changed to indicate that the hour is in 12-hour format.

--
Jeff Carnahan - jcarnahan@networq.com

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-07 01:32 UTC] danbeck@php.net
Corrected in phpdoc cvs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 08:01:30 2024 UTC