Re: First day of the month
| From: | John Holmes | Date: | Tue, 03 Aug 2004 18:10:01 +0000 |
| Subject: | Re: First day of the month | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192572@lists.php.net to get a copy of this message | ||
David Hansen Jr. wrote:
I'm trying to make a custom calendar script for my school district, and I'm hitting a little obstacle. I know how I can accomplish what I'm after, but it's a lot of extra coding. I'm wondering if there's a simple way to figure out what day of the week the first day of the month lands on. I can take the info pulled with date() and use several switch() and if statements, but that's ugly. Anyone have any suggestions?echo date('D',mktime(0,0,1,1,date('m'),date('Y')); http://us2.php.net/date http://us2.php.net/mktime -- John Holmes php|architect - The magazine for PHP professionals - http://www.phparch.com