Re: Bug??
| From: | Scott Noyes | Date: | Tue, 30 Aug 2005 16:21:09 +0000 |
| Subject: | Re: Bug?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221606@lists.php.net to get a copy of this message | ||
> for($i=1;$i<13;$i++) {
> echo $i . " :: ";
> echo date('F', mktime(0, 0, 0, $i)) . " :: ";
> echo mktime(0, 0, 0, $i) . "\n";
> }
>
>
> 1 :: January :: 1107061200
> 2 :: March :: 1109739600
> 3 :: March :: 1112158800
Today is the 30th (in some parts of the world, anyway). mktime fills
in the current time is no argument is provided. So for Feb, the
equivalent is
mktime(0, 0, 0, 2, 30, 2005, true);
And the 30th day of Feb, 2005 is March 2nd.