note 66774 deleted from function.date by derick

From: Date: Sun, 11 Jun 2006 11:48:09 +0000
Subject: note 66774 deleted from function.date by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-114275@lists.php.net to get a copy of this message
Note Submitter: Max222 ---- Hey all. Allot of ppl have problems with weeks in a year. I hope this help you guys! function getWeeksOfYear($aYear) { $m_week = 30; for($x = 1;$x < 32;$x++){ $t_week = date("W",mktime(0,0,0,12,$x,$aYear)); if((int)$t_week > (int)$m_week){ $m_week = $t_week; } } return $m_week; } This will give you number of weeks in a given year :)

« previous php.notes (#114275) next »