Source Code:
(back to article)
<?php $date1 = new DateTime('2022-01-01'); $date2 = new DateTime('2022-01-15'); $interval = $date1->diff($date2); echo $interval->format('%R%a Tage');
Result:
Report an issue