Re: Calculate # of minutes during working hours between two dates

From: Date: Wed, 20 Jun 2001 19:35:52 +0000
Subject: Re: Calculate # of minutes during working hours between two dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54591@lists.php.net to get a copy of this message
sloppy psuedocode:(but you get the idea) numdays = date2 - date1 minperday = 60 * 9.5(hrs) totalminutes for interval = numdays * minperday ----- Original Message ----- From: "Wim Koorenneef" <wim.koorenneef@home.nl> To: <php-general@lists.php.net> Sent: Wednesday, June 20, 2001 11:25 AM Subject: [PHP] Calculate # of minutes during working hours between two dates > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#54591) next »