note 30786 deleted from function.jddayofweek by didou

From: Date: Mon, 10 Jan 2005 01:07:18 +0000
Subject: note 30786 deleted from function.jddayofweek by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83017@lists.php.net to get a copy of this message
Note Submitter: Wilfried ---- 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.

« previous php.notes (#83017) next »