Re: [PHP] First day of the month

2004-08-03 Thread David Hansen Jr.
On Tue, 2004-08-03 at 11:09, Matthew Sims 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?
> >
> > Thanks!
> > ~ David
> >
> 
> You mean like:
> 
> $firstWkDay = date("l", mktime(0,0,0,7,1,2004));

That's much simpler that what I had in my head.

Thanks so much!
~ David

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] First day of the month

2004-08-03 Thread David Hansen Jr.
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?

Thanks!
~ David

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php