time

actual val time: LocalTime(source)
expect val time: LocalTime(source)

Returns the time part of this date/time value.

Samples

import kotlinx.datetime.*
import kotlinx.datetime.format.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   // Constructing a LocalDateTime value from a LocalDate and a LocalTime
val date = LocalDate(2024, 2, 15)
val time = LocalTime(16, 48)
val dateTime = LocalDateTime(date, time)
check(dateTime.date == date)
check(dateTime.time == time) 
   //sampleEnd
}
actual val time: LocalTime(source)
actual val time: LocalTime(source)