title: Check if current date lies between start date and end date
body: <p>I am doing some work in Grails. My domain class (Simple Messages) consists of a start date and end date. I want to display to the user the 'messages' only if the current date (now) is within the start date and end date, i.e. the message should be visible to the user only if today is between start date and end date. Please also note, I do not want any time related computation.</p>
  
  <p>Here is the domain class:</p>
  
  <pre><code>class SimpleMessage
  {
      String message
      Date startDate
      Date endDate
  }
  </code></pre>
  
  <p>Here is the method defined in my service to extract valid messages:</p>
  
  <pre><code>def GetLiveMessages()
  {
      def coTimeStamp = new Date().clearTime().toTimestamp()
  
      def c = SimpleMessage.createCriteria()
  
      def coCurrentMessages = c.list
      {
          ge("startDate", coTimeStamp) 
          le("endDate", coTimeStamp)
      }
  
      return coCurrentMessages
  }
  </code></pre>
  
  <p>coCurrentMessages is always returning with size 0. I have added records (start date - 1 June 2012 and end date 2 June 2012) with valid dates, still this returns 0 (for today - 1 June 2012). Surprisingly, if i remove the 2nd constraing 'le' I get the message record correctly.</p>
  
  <p>Your help will be appreciated.</p>