Posted by Tomas on 02/06/06 18:19
Hello
I have to do a script that calculates the intersection of 2 times. I
write it in php instead of explaining:
$time1_from = "2006-02-01 08:00";
$time1_to = "2006-02-01 20:00";
$time2_from = "2006-02-01 06:00";
$time2_to = "2006-02-01 18:00";
I want the script to calculate that there are 8 hours common in those
two times. And the script should work for any 2 times. And of course,
where there is no intersection, the return value should be 0.
Im unable to solve this problem, so I'm pleasing you for help.
A big thank for the solver in advance!!!
Tomas Srna
[Back to original message]
|