If you want to check it out, I used this code. You can see the example is
wrong.

echo date("D M j G:i:s T Y").'   // Sat Mar 10 17:16:18 MST 2001<br>';
echo date('H:m:s \m \i\s\ \m\o\n\t\h').'   // 17:16:18 m is month <br>';
echo date("H:i:s").'   // 17:16:18<br>';


Thiago Henrique Pojda
http://nerdnaweb.blogspotDOT com


On Mon, Jan 26, 2009 at 4:03 PM, Thiago Pojda <thi...@php.net> wrote:

> Can someone please commit this for me?
>
> Took me a while to figure this bug actually messes up the point of this
> example.
>
>
> Thanks :)
>
> Thiago Henrique Pojda
> http://nerdnaweb.blogspotDOT com
>
>
>
> ---------- Forwarded message ----------
> From: <thi...@php.net>
> Date: Mon, Jan 26, 2009 at 3:55 PM
> Subject: [PHP-NOTES] note 88484 deleted from function.date by thiago
> To: php-no...@lists.php.net
>
>
> Note Submitter: blog.frozenonline.com
>
> ----
>
> 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
> ?>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

Reply via email to