<?php $dateValues = ["Sunday 21st October 2018", "Monday 1st October 2018"]; $dtLimit = new \DateTime("-14 days, midnight"); foreach ($dateValues as $dateValue) { $dtCompare = DateTime::createFromFormat("!l jS F Y", $dateValue); var_dump($dtCompare < $dtLimit); }
You have javascript disabled. You will not be able to edit any code.