title: Comparing two Calendar objects
body: <p>I want to compare two Calendar objects to see if they both contain the same date. I don't care about any value below days.</p>
  
  <p>I've implemented this and I can't think about any case where it should fail:</p>
  
  <pre><code>private static boolean areEqualDays(Calendar c1, Calendar c2) {
      SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
      return (sdf.format(c1.getTime()).equals(sdf.format(c2.getTime())));
  }
  </code></pre>
  
  <p>Is this approach correct or should I compare c1 and c2 field by field?</p>