note 4196 deleted from date by ronabop

From: Date: Sat, 10 Mar 2001 22:26:50 +0000
Subject: note 4196 deleted from date by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-12204@lists.php.net to get a copy of this message
Here is a more accurate way to get the week of the year: function weekofyear() { $d = 1; while (date("w",mktime(0,0,0,1,$d,date("Y"))) != 1) { $d++; }; return(floor((date("z")-$d+13)/7.0-1)); }

« previous php.notes (#12204) next »