You are here: Intersection of 2 times in php « PHP Programming Language « IT news, forums, messages
Intersection of 2 times in php

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация