code: public static LocalDate from(TemporalAccessor temporal) {
          Objects.requireNonNull(temporal, "temporal");
          LocalDate date = temporal.query(TemporalQueries.localDate());
          if (date == null) {
              throw new DateTimeException("Unable to obtain LocalDate from TemporalAccessor: " +
                      temporal + " of type " + temporal.getClass().getName());
          }
          return date;
      }
docs: Obtains an instance of {@code LocalDate} from a temporal object.
  <p>
  This obtains a local date based on the specified temporal.
  A {@code TemporalAccessor} represents an arbitrary set of date and time information,
  which this factory converts to an instance of {@code LocalDate}.
  <p>
  The conversion uses the {@link TemporalQueries#localDate()} query, which relies
  on extracting the {@link ChronoField#EPOCH_DAY EPOCH_DAY} field.
  <p>
  This method matches the signature of the functional interface {@link TemporalQuery}
  allowing it to be used as a query via method reference, {@code LocalDate::from}.
  
  @param temporal  the temporal object to convert, not null
  @return the local date, not null
  @throws DateTimeException if unable to convert to a {@code LocalDate}