note 51442 deleted from function.date by betz

From: Date: Thu, 31 Mar 2005 11:41:50 +0000
Subject: note 51442 deleted from function.date by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-87251@lists.php.net to get a copy of this message
Note Submitter: djmaze(AT)cpgnuke(.)com ---- @date who wrote on 30-Mar-2005 08:11 "However, if I change date("d") to 1, the results are correct. I think this is perhaps a small bug in the computation of the time in the mktime( )." That's no bug there exists no februari 30. Your code is lacking all over the place. This shouldn't be a user contributed note. @redsolution at web dot de who wrote on 28-Mar-2005 08:48 As show above in the function description you may use date('w'): <php $day = date('w'); $firstday = time(); if ($day > 0 && $day < 7) { $firstday -= ($day*86400); } $lastday = $firstday+(6*86400); ?> However this doesn't check for DST look below at my note.

« previous php.notes (#87251) next »