Re: Date Issue

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

 



On Mon, Mar 31, 2008 at 4:15 PM,  <admin@xxxxxxxxxxxxxxxxxxx> wrote:
> I tried that a big no go.
>  Seems if I do a +1 i get 2 months from now and a -1 gives me the current month.

Like I said, mktime makes corrections for otherwise invalid dates.
Today is March 31. Moving the month number back by one (-1) creates a
timestamp for February 31, which gets corrected to become March 2
(March 3 in non-leap years). Moving the month number ahead by one (+1)
creates a timestamp for April 31 gets corrected to become May 1.

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