hour
Returns the hour-of-day (0..23) time component of this time value.
Samples
import kotlinx.datetime.*
import kotlinx.datetime.format.*
import kotlin.random.*
import kotlin.test.*
fun main() {
//sampleStart
// Getting the number of whole hours shown on the clock
check(LocalTime(8, 30, 15, 123_456_789).hour == 8)
//sampleEnd
}