core-ktx / androidx.time / java.time.LocalTime / component1

component1

inline operator fun LocalTime.component1(): Int

Return the hour of this LocalTime.

This method allows to use destructuring declarations when working with times, for example:

val (hour, minute, second) = myLocalTime

See Also

LocalTime.getHour