Period.get

Gets the value of the requested unit. !(p) This returns a value for each of the three supported units, {@link ChronoUnit#YEARS YEARS}, {@link ChronoUnit#MONTHS MONTHS} and {@link ChronoUnit#DAYS DAYS}. All other units throw an exception.

@param unit the {@code TemporalUnit} for which to return the value @return the long value of the unit @throws DateTimeException if the unit is not supported @throws UnsupportedTemporalTypeException if the unit is not supported

class Period
override
long
get

Meta