title: Check if two instances of "Instant" are on the same date in Java 8
body: <p>I have two instances of the <a href="http://docs.oracle.com/javase/8/docs/api/java/time/Instant.html"><code>Instant</code></a> class from <code>java.time</code> such as this:</p>
  
  <pre><code>Instant instant1 = Instant.now();
  Instant instant2 = Instant.now().plus(5, ChronoUnit.HOURS);
  </code></pre>
  
  <p>Now I would like to check if the two instances of <code>Instant</code> are actually on the same date (day, month and year match). Easy I thought, let's just use the shiny new <a href="http://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html"><code>LocalDate</code></a> and the universal <a href="http://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html#from-java.time.temporal.TemporalAccessor-"><code>from</code></a> static method:</p>
  
  <pre><code>LocalDate localdate1 = LocalDate.from(instant1);
  LocalDate localdate2 = LocalDate.from(instant2);
  
  if (localdate1.equals(localdate2)) {
     // All the awesome
  }
  </code></pre>
  
  <p>Except that universal <code>from</code> method is not so universal and Java complains at runtime with an exception:</p>
  
  <pre><code>java.time.DateTimeException: Unable to obtain LocalDate from TemporalAccessor: 2014-11-04T18:18:12Z of type java.time.Instant
  </code></pre>
  
  <p>Which leaves me back at square 1.</p>
  
  <p>What is the recommended/fastest way check if two instances of <code>Instant</code> actually have the same date (have the same day, month, and year)?</p>