<?php $date_a = new DateTime('now'); $date_b2 = new DateTime('wednesday + 7 day 08:00'); $date_c2 = new DateTime('saturday + 7 day 20:00'); $intervaln = date_diff($date_a,$date_b2); $interval2n = date_diff($date_a,$date_c2); $diff1n = $intervaln->format('%d d. %h h. %i min.'); $diff2n = $interval2n->format('%d d. %h h. %i min.'); if ($diff1n > $diff2n) { echo $diff1n; } else if ($diff1n < $diff2n) { echo $diff2n; }
You have javascript disabled. You will not be able to edit any code.