note 30786 added to function.jddayofweek

From: Date: Fri, 28 Mar 2003 14:17:29 +0000
Subject: note 30786 added to function.jddayofweek
Groups: php.notes 
Request: Send a blank email to php-notes+get-45950@lists.php.net to get a copy of this message
Doesn't work in PHP 4.3.0 even using mode 0. The date() and mktime() functions do the job for me, to get the day of week of any date: <?php $year='2003'; $month='03'; $day='28'; $WeekDay=date("l", mktime(0, 0, 0, $month, $day, $year)); echo "The day is: ".$WeekDay; // This will show 'The day is: Friday' ?> This returns the day as a string. If you want an integer (0=Sunday, 6=Saturday), replace "l" (lowercase L) by "w". Hope this helps. -- http://www.php.net/manual/en/function.jddayofweek.php http://master.php.net/manage/user-notes.php?action=edit+30786 http://master.php.net/manage/user-notes.php?action=delete+30786 http://master.php.net/manage/user-notes.php?action=reject+30786

« previous php.notes (#45950) next »