title: How to find the number of days between two dates in java or groovy?
body: <p>I have a method which uses following logic to calculate difference between days.</p>
  
  <pre><code>long diff = milliseconds2 - milliseconds1;
  long diffDays = diff / (24 * 60 * 60 * 1000);
  </code></pre>
  
  <p>but I want for ex, <code>9th feb 2011 to 19th feb 2011</code> should return me <code>11</code> days irrespective of second or milliseconds consideration. How can I achieve this?</p>