note 69296 deleted from function.strtotime by bobby

From: Date: Mon, 18 Sep 2006 14:32:13 +0000
Subject: note 69296 deleted from function.strtotime by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-117291@lists.php.net to get a copy of this message
Note Submitter: adrian ---- re: horvathi Actually, the person replying to your post is correct. Here it is, straight from the manual's mouth: "The fuzz in units can cause problems with relative items. For example, '2003-07-31 -1 month' might evaluate to 2003-07-01, because 2003-06-31 is an invalid date. To determine the previous month more reliably, you can ask for the month before the 15th of the current month." "-1 month" and "-30 days" are not equal. "month" causes the function to work directly on the month value of the date, only adjusting the year if your roll forward or backward too many months. The day piece of the date is untouched, allowing for invalid dates which are then transformed into valid dates. Regards, Adrian

« previous php.notes (#117291) next »