Re: PHP 5.3.6 Dates
| From: | Ian | Date: | Mon, 12 Dec 2011 17:06:06 +0000 |
| Subject: | Re: PHP 5.3.6 Dates | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315985@lists.php.net to get a copy of this message | ||
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
--