Re: Date Issue

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

 



On Mon, Mar 31, 2008 at 3:07 PM,  <admin@xxxxxxxxxxxxxxxxxxx> wrote:
> Not understanding why this is happening.
>
>  $month = date("F", mktime(0,0,0, date(m), date(d), date(Y)));
>  $zomonth = date("F", mktime(0,0,0, date(m)-1, date(d), date(Y)));
>
>  echoing out the exact same month
>  March
>  March
>
>  Checked server timezone/date/time all is good. Am I half asleep at the wheel on this one and just not seeing my mistake here?

mktime "will automatically calculate the correct value for out-of-range input."

The "31st day of February in 2008" is March 2nd, so both dates are in March.

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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