RE: [PHP] strange behaviour with strtotime()
| From: | Ford, Mike | Date: | Tue, 31 Jan 2006 13:38:23 +0000 |
| Subject: | RE: [PHP] strange behaviour with strtotime() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229541@lists.php.net to get a copy of this message | ||
On 31 January 2006 13:04, James Benson wrote:
> "Because 1 month from 31-Jan is 31-Feb -- which is taken to
> mean 02-Mar,
> hence the output of date("M" ...)."
>
>
>
> why though, one month from now is 31 Feb, why would it take it as
> something else?
>
> That does not make sense to me!
Well does 31st February make sense to you??
It *has* to take it as something else, and the most obvious thing to take it
as is 3rd March (not 2nd -- I was wrong before as 2006 is not a leap year!)
which is the day that would be 31st Feb if it existed...!!!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm