Calculate # of minutes during working hours between two dates
| From: | Wim Koorenneef | Date: | Wed, 20 Jun 2001 15:25:39 +0000 |
| Subject: | Calculate # of minutes during working hours between two dates | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54545@lists.php.net to get a copy of this message | ||
Hi all,
I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30.
I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better, more efficient algorithm? Tia.
--
Greetinx,
Wim Koorenneef <wim.koorenneef@home.nl> Boxtel, the Netherlands