note 68640 modified in function.date by bobby
| From: | bobby@php.net | Date: | Thu, 07 Sep 2006 18:03:10 +0000 |
| Subject: | note 68640 modified in function.date by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116856@lists.php.net to get a copy of this message | ||
In response to the getLastWeekDay() function:
***^ EDITOR NOTE: Referred to note was removed 2006-09-07.
Changing dates for any reason by adding/subtracting secret is a really bad idea. Daylight savings
will totally screw up the calculations. Your best bets are the awesome strtotime features. To get
last monday for example:
$var = strtotime('last monday');
Strtotime can do all sorts of funky stuff like this.
--was--
In response to the getLastWeekDay() function:
Changing dates for any reason by adding/subtracting secret is a really bad idea. Daylight savings
will totally screw up the calculations. Your best bets are the awesome strtotime features. To get
last monday for example:
$var = strtotime('last monday');
Strtotime can do all sorts of funky stuff like this.
http://php.net/manual/en/function.date.php