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

From: Date: Thu, 21 Jun 2001 00:45:29 +0000
Subject: RE: [PHP] Calculate # of minutes during working hours between two dates
Groups: php.general 
Request: Send a blank email to php-general+get-54652@lists.php.net to get a copy of this message
You'll also need to calculate: * the number of minutes from the start time to 17:30 * the number of minutes from the 8:00 to the end time * the number of weekends between the times -- Jason Murray jasonm@melbourneit.com.au Web Developer, Melbourne IT "What'll Scorpy use wormhole technology for?" 'Faster pizza delivery.' > -----Original Message----- > From: SED [mailto:sed@sed.is] > Sent: Thursday, June 21, 2001 5:55 AM > To: 'Wim Koorenneef' > Cc: php-general@lists.php.net > Subject: RE: [PHP] Calculate # of minutes during working hours between > two dates > > > Try to find unix-time in seconds: (endtime - starttime) / 60 = total > minutes > > SED > > -----Original Message----- > From: Wim Koorenneef [mailto:wim.koorenneef@home.nl] > Sent: 20. júní 2001 15:26 > To: php-general@lists.php.net > 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 > > > -- > 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 (#54652) next »