首页 > Web开发 > 详细

比较时间段一与时间段二是否有交集的php函数

时间:2016-02-06 11:46:17      阅读:233      评论:0      收藏:0      [点我收藏+]
复制代码 代码如下:

/*
*比较时间段一与时间段二是否有交集
*/
function isMixTime($begintime1,$endtime1,$begintime2,$endtime2)
{
$status = $begintime2 - $begintime1;
if($status>0){
$status2 = $begintime2 - $endtime1;
if($status2>0){
return false;
}else{
return true;
}
}else{
$status2 = $begintime1 - $endtime2;
if($status2>0){
return false;
}else{
return true;
}
}
}

比较时间段一与时间段二是否有交集的php函数

原文:http://www.jb51.net/article/27280.htm

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!