I am using following code in WordPress to check if articles are posted before 15-09-17 but the problem is if the date is greater than 15 and month is less it still shows the day is greater. For example if $pdate is 28-08-17 and $mydate is 15-09-17 it still return as true.
$pdate = strtotime(get_the_date("d-m-y"));
$mydate = strtotime('15-09-17');
if ($pdate>$mydate)
{
//do something
}
else {
//do something
}