code: public static boolean isSameInstant(final Date date1, final Date date2) {
          if (date1 == null || date2 == null) {
              throw new IllegalArgumentException("The date must not be null");
          }
          return date1.getTime() == date2.getTime();
      }
docs: <p>Checks if two date objects represent the same instant in time.</p>
  
  <p>This method compares the long millisecond time of the two objects.</p>
  
  @param date1  the first date, not altered, not null
  @param date2  the second date, not altered, not null
  @return true if they represent the same millisecond instant
  @throws IllegalArgumentException if either date is <code>null</code>
  @since 2.1