Monthly Archives: February 2017

Check if current time is between two times, with the possibility of lapping days

function check_time($t1, $t2, $tn) { $t1 = +str_replace(“:”, “”, $t1); $t2 = +str_replace(“:”, “”, $t2); $tn = +str_replace(“:”, “”, $tn); if ($t2 >= $t1) { return $t1 <= $tn && $tn < $t2; } else { return ! ($t2 <= … Continue reading

Posted in PHP | Leave a comment