I'm trying to work out if a date is after or the same as another date. But only looking at the month/year, i need to exclude the day from the comparison.

```
$paymentDate = DateTime::createFromFormat("Y-m-d", "2014-05-04");
$expiryDate = DateTime::createFromFormat("m/y", "03/17");

if ($paymentDate->format('m/y') >= $expiryDate->format('m/y')) {

   echo "Payment date is after or equal to the expiry date - payment won't work";

}

```

Why is this echoing the statement? Am I comparing this wrong? I thought you could compare dates this way.