I could solve the problem myself, but the behaviour is still strange. The comparsion works for: $today = date('Y-m-d',time()); $enddate = date('Y-m-d',time() + 3 * 86400); but does not work: $today = new \DateTime('today'); $enddate = $today->add(new \DateInterval('P3D'));