note 15660 added to function.strtotime
| From: | michel at webfabriek dot nl | Date: | Tue, 25 Sep 2001 14:24:20 +0000 |
| Subject: | note 15660 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18281@lists.php.net to get a copy of this message | ||
A bug:
$mydate = strtotime ("2001-10-1");
$prevdate = strtotime ("-1 day", $mydate);
// $prevdate is still 1 oct. 2001, on other dates the subtraction works fine.
$mydate = strtotime ("2001-10-1");
$prevdate = strtotime ("-2 days", $mydate);
// $prevdate is now at 30 sep 2001.
So apparently crossing over to the month before needs some 'extra effort'.
--
http://www.php.net/manual/en/function.strtotime.php
http://master.php.net/manage/user-notes.php?action=edit+15660
http://master.php.net/manage/user-notes.php?action=delete+15660
http://master.php.net/manage/user-notes.php?action=reject+15660