RE: [PHP] Calculate # of minutes during working hours between two dates

From: Date: Wed, 20 Jun 2001 19:56:23 +0000
Subject: RE: [PHP] Calculate # of minutes during working hours between two dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54597@lists.php.net to get a copy of this message
figure out how many minutes per day, put that as a constant in your script, then just multiply that by the number of days between the two dates. ... or would you prefer something more convoluted? ;) > -----Original Message----- > From: Wim Koorenneef [mailto:wim.koorenneef@home.nl] > 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

« previous php.general (#54597) next »