note 68640 added to function.date
| From: | Matt_B at TinyOnline dot co dot uk | Date: | Fri, 04 Aug 2006 15:00:39 +0000 |
| Subject: | note 68640 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115550@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 83.138.144.80
Probable Submitter: 81.153.68.217
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/68640
Del: integrated -- https://master.php.net/note/delete/68640/integrated
Del: useless -- https://master.php.net/note/delete/68640/useless
Del: bad code -- https://master.php.net/note/delete/68640/bad+code
Del: spam -- https://master.php.net/note/delete/68640/spam
Del: non-english -- https://master.php.net/note/delete/68640/non-english
Del: in docs -- https://master.php.net/note/delete/68640/in+docs
Del: other reasons-- https://master.php.net/note/delete/68640
Reject -- https://master.php.net/note/reject/68640
Search -- https://master.php.net/manage/user-notes.php