title: Comparing dates stored in date objects and getting a boolean returned
body: <p>I am having trouble comparing dates in Java I have tried:</p>
  
  <pre><code>(today == actDate)
  
  (today.equals(actDate))
  </code></pre>
  
  <p>Both always seem to evaluate to false:</p>
  
  <p><img src="https://i.stack.imgur.com/shgAC.png" alt="enter image description here"></p>
  
  <p>In the image above the first date is today and the second is actDate.</p>
  
  <p>Both are date objects:</p>
  
  <pre><code>Date today = new Date(System.currentTimeMillis());
  
  Date actDate = new Date(taskHours.get(j).getDate().getTime());
  </code></pre>
  
  <p>Then I tried using compareTo, but this appears to return a 1 if the date is greater and a -1 if lower.</p>
  
  <p>What am I doing wrong?</p>