Diff in days Beetween [date today -> specific date]

<?php $datetime1 = new DateTime($date_modified); // $date_modified="2016-05-10"; $datetime2 = new DateTime(date('Y-m-d')); // today is "2016-05-19" $interval = $datetime1->diff($datetime2); //get diff $days = $interval->format(' %a days'); //format echo "days after last modification $days"; ?>
Diff in days Beetween [date today -> specific date]

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.