Re: strange behaviour with strtotime()

From: Date: Tue, 31 Jan 2006 14:51:39 +0000
Subject: Re: strange behaviour with strtotime()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-229554@lists.php.net to get a copy of this message
Ford, Mike wrote:
On 31 January 2006 14:12, Barry wrote:
Barry wrote: Last try: Edit:
also 31st January -> +2 Month -> is for me 3rd April > > 31st March is not true because i miss "3" (!!) days. > Huh? Are you saying that, for you: strtotime("+2 months"); gives 3rd April? If so, I would be absolutely amazed, because I get 31st March, which is exactly what I expect. Of course, if you add 1 month to 31st Jan, then add 1 month to the result, you will get 3rd April -- but that's not the same as simply adding 2 months to 31st Jan. If you want 2 months from today, ask for 2 months from today -- not 1 month from 1 month from today!! Thats not logic at all.
If you want 2 apples ask for two ones. Not for one apple and one more apple. Because you would just get 1 1/2. Wtf!? O_o -- Smileys rule (cX.x)C --o(^_^o)

« previous php.general (#229554) next »