note 4196 modified in date by ronabop

From: Date: Fri, 01 Sep 2000 04:27:57 +0000
Subject: note 4196 modified in date by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-3873@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)); } http://www.php.net/manual/function.date.php

« previous php.notes (#3873) next »