title: Check if Date is before today regardless hour Java
body: <p>Helo everyone!</p>
  <p>I'm trying to compare two Dates in java, to know if one is before the actual day, but it compares the time too, so regardless is the same day, it says its before becouse compares them with the time. Is there any way to just know if the date is before the current day, not the time?</p>
  <p>Here is the code 'im using (the date comes from a times</p>
  <pre><code>long timestampDate = 1623307684;
  Date date = new Date((long)timestampDate*1000);
  if(date.before(Calendar.getInstance().getTime()))
  {
      System.out.println(&quot;Was yesterday&quot;);
  }
  else
  {
      System.out.println(&quot;Is today&quot;);
  }
  </code></pre>
  <p>Thank for your time!</p>