title: Date Filter in java
body: <p>I need to filter a date from the "From date" to the "To date" using the "Current date" filter.</p>
  
  <p>Here is the code I use in my java application:</p>
  
  <pre><code>String from = "19/05/1991";
  String cmp = "23/05/1991";
  String to = "23/12/2015";
  
  if (from.compareTo(cmp) &lt;= 0 &amp;&amp; to.compareTo(cmp) &gt;= 0) {
      System.out.println("Date lies between from and to date");
  }
  </code></pre>
  
  <p>Is this code correct?</p>