Source Code:
(back to article)
<?php $datetime1 = new DateTime('2022-03-03 00:00:00'); $datetime2 = new DateTime('2023-03-03 00:00:00'); $interval = $datetime1->diff($datetime2); echo $interval->format('%R%a days %H hours %I minutes');
Result:
Report an issue