Re: Week Days

From: Date: Fri, 19 Aug 2005 18:50:15 +0000
Subject: Re: Week Days
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-220969@lists.php.net to get a copy of this message
Easy enough to change that date(...mktime(...)) command above to return the weekday and while the weekday is a weekend just add a day and repeat.
Actually sorry to post again on the same post, but this is like the first solution posted and is invalid since it doesn't account for non-weekdays that fall within the range. It only checks the endpoints of the addition. For instance adding 50 days would contain about 20 or so weekend days.
Ah... but you are forgetting the rule I live by... anything that happened more than a week ago or is happening more than a week in the future... doesn't count, I don't remember, and I can't be held responsible for. :-) good catch though.

« previous php.general (#220969) next »