Source Code:
(back to article)
<?php $start = new DateTime('2022-01-01 10:00:00'); $end = new DateTime('2022-01-01 11:30:00'); $diff_in_seconds = $end->getTimestamp() - $start->getTimestamp(); $minutes = floor($diff_in_seconds / 60); echo $minutes; // output: 90
Result:
Report an issue