RE: Calculating weeknumbers

From: Date: Sun, 22 Oct 2000 22:15:54 +0000
Subject: RE: Calculating weeknumbers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21670@lists.php.net to get a copy of this message
Hey Jari, I would think that it wouldn't be too time consuming to write a script that does that using the date function in php.... http://www.php.net/manual/function.date.php date(z) will give you the number date...add one to account for the fact that it returns results 0-365, and then depending on how you're counting, you should be able to divide by 7 to get what you're looking for....obviously be careful to check it out with leap years, and etc (7 x 52 != 365) but i think with a lil time you could work that out.... if someone knows of a script that's already written or better yet a function that does this, then please post that! best, Jack Dempsey -----Original Message----- From: Jari Ivanoff [mailto:jari.ivanoff@telia.com] Sent: Sunday, October 22, 2000 5:32 PM To: PHP Subject: Calculating weeknumbers Hi! Does anyone know how to calculate what number a certain week has? Like the week that starts tomorrow monday has no. 43 ? /Jari Ivanoff

« previous php.general (#21670) next »