title: CakePHP 3 : check date greater than today
body: <p>I have an attribute <code>valid_till</code> of type <code>DATE</code>.</p>
  
  <p>Now what I want to do is to compare <code>valid_till</code> from today's day.</p>
  
  <pre><code>$couponCheck = $this-&gt;Coupons-&gt;find('all', [
      'conditions' =&gt; [
         'coupon_code' =&gt; $couponCode
       ]
     ]);
     if ($couponCheck-&gt;count() === 1) {
       $coupon = $couponCheck-&gt;first();
       if ($coupon-&gt;valid_till &gt;= isToday()) {
          echo 'Coupon is Valid';
       } else {
          echo 'Coupon is Expired';
       }
     } else {
        echo 'This is not a valid coupon code';
     }
  </code></pre>
  
  <p>But this is not working. How could I do this ?</p>