<?php 
$now = new DateTime();
$endOfDay = new DateTime("today 23:59:59");
$interval = $endOfDay->diff($now);

$hoursLeft = $interval->h;
$minutesLeft = $interval->i;

echo "{$hoursLeft} hours and {$minutesLeft} minutes remaining today.";
?>

© 2024 NAEON