code: public static Year from(TemporalAccessor temporal) {
          if (temporal instanceof Year) {
              return (Year) temporal;
          }
          Objects.requireNonNull(temporal, "temporal");
          try {
              if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {
                  temporal = LocalDate.from(temporal);
              }
              return of(temporal.get(YEAR));
          } catch (DateTimeException ex) {
              throw new DateTimeException("Unable to obtain Year from TemporalAccessor: " +
                      temporal + " of type " + temporal.getClass().getName(), ex);
          }
      }
docs: Obtains an instance of {@code Year} from a temporal object.
  <p>
  This obtains a year 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 Year}.
  <p>
  The conversion extracts the {@link ChronoField#YEAR year} field.
  The extraction is only permitted if the temporal object has an ISO
  chronology, or can be converted to a {@code LocalDate}.
  <p>
  This method matches the signature of the functional interface {@link TemporalQuery}
  allowing it to be used as a query via method reference, {@code Year::from}.
  
  @param temporal  the temporal object to convert, not null
  @return the year, not null
  @throws DateTimeException if unable to convert to a {@code Year}