Local Time
The time part of LocalDateTime.
This class represents time-of-day without a referencing a specific date. To reconstruct a full LocalDateTime, representing civil date and time, LocalTime needs to be combined with LocalDate via LocalDate.atTime or LocalTime.atDate.
Also, LocalTime does not reference a particular time zone. Therefore, even on the same date, LocalTime denotes different moments of time. For example, 18:43
happens at different moments in Berlin and in Tokyo.
The arithmetic on LocalTime values is not provided, since without accounting for the time zone transitions it may give misleading results.
Constructors
Constructs a LocalTime instance from the given time components.
Properties
Functions
Combines this time's components with the specified LocalDate components into a LocalDateTime value.
Combines this time's components with the specified date components into a LocalDateTime value.
Compares this
time value with the other time value. Returns zero if this value is equal to the other, a negative number if this value occurs earlier in the course of a typical day than the other, and a positive number if this value occurs later in the course of a typical day than the other.
Formats this value using the given format. Equivalent to calling DateTimeFormat.format on format with this
.
Converts this kotlinx.datetime.LocalDateTime value to a java.time.LocalTime value.
Returns the time as a millisecond of a day, in 0 until 24 * 60 * 60 * 1_000
.
Returns the time as a nanosecond of a day, in 0 until 24 * 60 * 60 * 1_000_000_000
.
Returns the time as a second of a day, in 0 until 24 * 60 * 60
.