Re: Week Number

From: Date: Sun, 04 May 2003 00:50:15 +0000
Subject: Re: Week Number
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146315@lists.php.net to get a copy of this message
No need to use MySQL, as of PHP 4.1.0 date() will give you the week number, for example: <?php $week = date('W', strtotime('2001-12-30')); ?> Jason Ben C. wrote:
Matt, If you are using MySQL you can use the MySQL function SELECT WEEK('2001-12-30'); it would return 53 for the 53rd week. Hope this helps...Ben -----Original Message----- From: Matt Palermo [mailto:mpalermo@vt.edu] Sent: Friday, May 02, 2003 10:01 PM To: php-general@lists.php.net Subject: [PHP] Week Number Does anyone know if there is a function where I can feed it the day, month, and year parameters, and it will give me the week number of the year (like week 1-52)? Please let me know. Thanks. Matt


« previous php.general (#146315) next »