RE: [PHP] Week Number
| From: | Matt Palermo | Date: | Sat, 03 May 2003 05:57:52 +0000 |
| Subject: | RE: [PHP] Week Number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146237@lists.php.net to get a copy of this message | ||
When trying to find the day of the week, I used this:
$weekday=date('l',mktime(0,0,0,$Month,$Day,$Year));
and I tested it out for 11/23/2004, and it gave me "Thursday" and it
supposed to be "Tuesday." Anyone got any idea why?
Thanks,
Matt
-----Original Message-----
From: John W. Holmes [mailto:holmes072000@charter.net]
Sent: Saturday, May 03, 2003 1:08 AM
To: 'Matt Palermo'; php-general@lists.php.net
Subject: RE: [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.
Echo date('W',mktime(0,0,0,$month,$day,$year));
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php