On Mon, Jan 26, 2009 at 14:09, Thiago Pojda <thi...@php.net> wrote:
> 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>';

    That was an errant commit made by j...@php.net two weeks ago.  A
user had complained that the original example was wrong on a user
note, which I deleted.  They then apparently proceeded to complain on
IRC (Freenode ##PHP), according to his commit message.  I'm going to
update that now, Thiago.  Your patch won't address all of the fixes,
but I'll note that part of it is your fix.

    It's a simple mistake he made, that's all.  The example is meant
to show how 'm' can be confused with 'i', and it tripped up a DOC
editor in the process.  ;-P


>
> 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
>>
>>
>
>



-- 
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

Reply via email to