public static DayOfWeek from (TemporalAccessor temporal)

Obtains an instance of DayOfWeek from a temporal object.

This obtains a day-of-week based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of DayOfWeek.

The conversion extracts the DAY_OF_WEEK field.

This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, DayOfWeek::from.

Parameters:
temporal    the temporal object to convert, not null

Returns:  the day-of-week, not null

Exceptions:
DateTimeException    if unable to convert to a DayOfWeek