php check if given date time has passed or is tomorrow or is today or in the future
function checkDate($d){ $now = new DateTime(); $future_date = new DateTime($d); $interval = $future_date->diff($now); echo $interval->format("%R%a days"); } $date = "2018-11-26"; checkDate($date);