<?php $spam_date = "Fri, 13 Sep 2019 20:27:47 +0200"; $expiryDate = new \DateTime($spam_date); $expiryDate->add(new DateInterval("P30D")); echo $expiryDate->format("c") . "\n";// ISO 8601 format //2019-10-13T20:27:47+02:00 echo $expiryDate->format("r") . "\n";//JS format //Sun, 13 Oct 2019 20:27:47 +0200 $now = new DateTime("now"); if ($expiryDate < $now){ echo "time is passed"; } else { echo "time is not passed"; } exit;
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`