note 88484 added to function.date
| From: | blog dot frozenonline dot com at osu1 dot php dot net | Date: | Mon, 26 Jan 2009 18:41:31 +0000 |
| Subject: | note 88484 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149795@lists.php.net to get a copy of this message | ||
The documentation has the following (incorrect) example
<?php
$today = date("D M j G:i:s T Y"); // Sat Mar 10 17:16:18 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:16:18 m is month
$today = date("H:i:s"); // 17:16:18
?>
If we want to maintain consistency with the other examples provided in the same block of code, the
second line (H:m:s) is incorrect. The example shows the output of "H:m:s" as
"17:16:18"
This should instead be "17:03:18"
Here is the corrected example:
<?php
$today = date("D M j G:i:s T Y"); // Sat Mar 10 17:16:18 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:18 m is month
$today = date("H:i:s"); // 17:16:18
?>
----
Server IP: 81.223.48.75
Probable Submitter: 198.202.236.131 (proxied: 157.247.125.171)
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/88484
Del: integrated -- https://master.php.net/note/delete/88484/integrated
Del: useless -- https://master.php.net/note/delete/88484/useless
Del: bad code -- https://master.php.net/note/delete/88484/bad+code
Del: spam -- https://master.php.net/note/delete/88484/spam
Del: non-english -- https://master.php.net/note/delete/88484/non-english
Del: in docs -- https://master.php.net/note/delete/88484/in+docs
Del: other reasons-- https://master.php.net/note/delete/88484
Reject -- https://master.php.net/note/reject/88484
Search -- https://master.php.net/manage/user-notes.php