Re: mktime month

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Steudel wrote:
> Im a little confused on the number I should use for the month:
>  
> Take the following:
>  
> echo date('Ymd', mktime(0, 0, 0, 3, 0, date("Y")) );
>  
> I expected it to output: 20060331
>  
> But instead it outputs 20060228.

Correct.

You are asking it for the zeroth day of March, which is the last day of
February.

Regards,
Ozz.

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux