Search
 
SCRIPT & CODE EXAMPLE
 

PHP

datetime confict function php



$timeExist = checkTimeConfict(strtotime($postStartTime),strtotime($postEndTime),strtotime($dbStartTime),strtotime($dbEndTime));
if($timeExist){ // NOT IN CONFICT
  $isTimeOverlap = 0;
}else{ // TIME OVERLAP 
  $isTimeOverlap = 1;
  break;
}


function checkTimeConfict($post_start_time1,$post_end_time1,$db_start_time2,$db_end_time2)
{
    $timeCheck;
    if(($post_end_time1 < $db_start_time2))
    {
        $timeCheck = true;
        return $timeCheck;
    }
    else if(($post_start_time1 > $db_start_time2) && ($post_start_time1 > $db_end_time2)) 
    {
        $timeCheck = true;
        return $timeCheck;
    }
    else
    {
        $timeCheck = false;
        return $timeCheck;
    }

}
Comment

PREVIOUS NEXT
Code Example
Php :: php add km to longitude 
Php :: laravel store mail driver info in database 
Php :: PHP SimpleXML - Get Node Values 
Php :: Laravel 9 Multiple File Upload 
Php :: Max() Value And Min() Value 
Php :: SymfonyComponentHttpKernelExceptionNotFoundHttpException: POST http://localhost/post 
Php :: upgrade phpopensuse 
Php :: jquery media validation 
Php :: laravel passport login with username 
Php :: yii2 gridview get selected rows 
Php :: dont allow this command to every one set in meddlware laravel 
Php :: laravel many to many update all pivot 
Php :: cakephp get present name 
Php :: php variable array for json encode data 
Php :: if condition in laravel blade in select option 
Php :: moodle admin cli 
Php :: laravel model undefined property 
Php :: php ctype float 
Php :: laravel array validation 
Php :: laravel 
Php :: convert string to int php 
Php :: upgrade php 5.6 to 7 centos 7 
Php :: laravel http response with cookie 
Php :: php elvis operator 
Php :: time dropdown in html 
Java :: print map java 
Java :: android get screen width and height 
Java :: select a random element from a list java 
Java :: spring boot security maven 
Java :: java random numbers in specific range 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =