Calendar math .... how to count in week days....?
| From: | Anthony | Date: | Thu, 06 May 2004 19:51:18 +0000 |
| Subject: | Calendar math .... how to count in week days....? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-185556@lists.php.net to get a copy of this message | ||
I've run into a bit of a problem, that I know has been dealt with before,
but I don't know how to deal with it. Very simple, I have an application
that needs to do calendar math and do it specifically on business days. I
need to be able to add and subtract a number of days to only Monday though
Friday. Seems simple enough, but I can't figure out how to do it. The only
think I've come up with so far is to build a function that counts every day
and checks to see if it's a weekend or not. This wouldn't be all that hard
to do, but I'm wondering if there is a better way to do it? Anyone have a
really efficient function to do this, I need to figure out a LOT of dates in
this app.
- Anthony