note 18278 modified in function.mcal-week-of-year by irc-html
| From: | irc-html@php.net | Date: | Wed, 16 Jan 2002 21:12:23 +0000 |
| Subject: | note 18278 modified in function.mcal-week-of-year by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24960@lists.php.net to get a copy of this message | ||
[Ed Note: date('W') also gives week number of the year.
--irc-html@php.net]
little function to replace the MCAL one..
function week_of_year($nDay, $nMonth, $nYear){
$date = getdate(mktime(9, 0, 0, $nMonth + 1, $nDay, $nYear)); // 9:00AM at that day
return floor($date["yday"]/7) + 1;
}
--was--
little function to replace the MCAL one..
function week_of_year($nDay, $nMonth, $nYear){
$date = getdate(mktime(9, 0, 0, $nMonth + 1, $nDay, $nYear)); // 9:00AM at that day
return floor($date["yday"]/7) + 1;
}
http://www.php.net/manual/en/function.mcal-week-of-year.php