PHP 4.0 Bug #9988: Documentation has incorrect example for date()
| From: | jcarnahan at networq dot com | Date: | Mon, 26 Mar 2001 08:44:00 +0000 |
| Subject: | PHP 4.0 Bug #9988: Documentation has incorrect example for date() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49936@lists.php.net to get a copy of this message | ||
From: jcarnahan@networq.com
Operating system: N/A
PHP version: 4.0.4pl1
PHP Bug Type: Documentation problem
Bug description: Documentation has incorrect example for date()
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
--
Edit Bug report at: http://bugs.php.net/?id=9988&edit=1