title: Checking a date is between two dates
body: <p>In ColdFusion I can see the code below, however it does not seem to work. I want to make sure discount is only applied if the valid from and to dates are in range, see below.</p>
  
  <pre><code>if (
    DATEDIFF("d", discount.ValidFrom(), now()) &gt;= 0 
    AND  
    DATEDIFF("d", now(), discount.ValidTo()) &lt;= 0
  ){
     // ALL OK Accept Discount
  }
      else 
  {
     // Discount is no Longer Valid boo!
  }
  </code></pre>