title: How to check if the difference between 2 dates is more than 20 minutes
body: <p>I have a datetime  in a variable <code>previous</code>. Now i want to check if the previous datetime is more than twenty minutes before the current time.</p>
  
  <pre><code>Date previous = myobj.getPreviousDate();
  
  Date now = new Date();
  
  //check if previous was before 20 minutes from now ie now-previous &gt;=20
  </code></pre>
  
  <p>How can we do it?</p>