Re: PHP 5.3.6 Dates

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

 



On 12/12/2011 16:56, Floyd Resler wrote:
> If this was already discussed I apologize for the duplicate question.  For some reason dates of 0000-00-00 get converted to 11/30/-0001 with the date function.  Is this be design or a bug?
> 
> Thanks!
> Floyd
> 
> 

Hi,

In the past I have noticed that zero used in date functions causes a
subtraction.  In this case it is probably working like this (all
speculation!)

Start with 1 Jan 0000

Take away 1 Month gives:

31 Nov -0001 (not valid though)

Take away 1 day

30 Nov -0001

I'm sure someone with more knowledge of the internals can explain this
better.

Regards

Ian
-- 





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