note 26792 added to function.strtotime

From: Date: Wed, 13 Nov 2002 01:29:27 +0000
Subject: note 26792 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-39419@lists.php.net to get a copy of this message
converting string: "Tuesday 10:15:00" OR "next Tuesday 10:15:00" even if the current time is 16:00:00 on Tuesday (ie after the event) will create a timestamp for today, not next week. as soon as it becomes Wednesday, either above string would generate Tuesday of next week. the problem only occurs on the day, after the time. you can use "+1 week Tuesday 10:15:00" but if it was before 10:15:00 you'd be skiping this week. I got round this by comparing the stored timestamp to time() and only displaying rows with timestamp greater than time() if anyone knows a better solution..... -- http://www.php.net/manual/en/function.strtotime.php http://master.php.net/manage/user-notes.php?action=edit+26792 http://master.php.net/manage/user-notes.php?action=delete+26792 http://master.php.net/manage/user-notes.php?action=reject+26792

« previous php.notes (#39419) next »