note 19566 added to function.date
| From: | alex at pixar dot es | Date: | Mon, 04 Mar 2002 11:37:50 +0000 |
| Subject: | note 19566 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27310@lists.php.net to get a copy of this message | ||
A simple a short way to know if a given date is a weekend day or not can be the next one:
$date = date ("w", mktime (0,0,0,3,3,2002));
$notweekend = ($date%6)?1:0;
$notweekend will return 1 when the day is between Monday and Friday.
--
http://www.php.net/manual/en/function.date.php
http://master.php.net/manage/user-notes.php?action=edit+19566
http://master.php.net/manage/user-notes.php?action=delete+19566
http://master.php.net/manage/user-notes.php?action=reject+19566