Why is the Calendar before() method returning true for equal dates
<p>I am setting a color field based on how the <code>dueDate</code> field compares to the current date.  <code>dueDate</code> is an SQL Date type.  My problem is when I pass in the current date the <code>Calendar.before()</code> method says the date is before the current date.  My code is:</p>

<pre><code>private String getDateDueColor(Date dateDue) {
      Calendar today =  Calendar.getInstance();
      today.setTime(new java.sql.Date(Calendar.getInstance().getTime().getTime()));
      Calendar dueDate = Calendar.getInstance();
      dueDate.setTime(dateDue);
      if(dueDate.before(today)){
        return RED;
      }else{
        return NORMAL;
      }
  }
</code></pre>

<p>I have set a breakpoint and compared <code>dueDate</code> and <code>today</code> and all of the information in the <code>cdate</code> field for each object looks identical, but the <code>dueDate.before(today)</code> still returns true.  Any help would be appreciated!</p>