<?php $time = '1985-04-19T19:12:11'; $timeOnly = DateTime::createFromFormat("!????-??-??\TH:i:s+", $time); $begin = DateTime::createFromFormat('!H:i', '18:00'); $end = DateTime::createFromFormat('!H:i', '22:00'); var_dump($timeOnly, $begin, $end, $timeOnly > $begin, $timeOnly < $end);
You have javascript disabled. You will not be able to edit any code.