Time

value class Time(val encoded: TimeSpan) : Comparable<Time> , Serializable

Represents a union of millisecond, second, minute and hour.

Constructors

Link copied to clipboard
constructor(encoded: TimeSpan)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val hour: Int

The hour part.

Link copied to clipboard

The hour part adjusted to 24-hour format.

Link copied to clipboard
Link copied to clipboard
val minute: Int

The minute part.

Link copied to clipboard
val second: Int

The second part.

Functions

Link copied to clipboard
fun adjust(): Time

Returns new Time instance adjusted to 24-hour format.

Link copied to clipboard
open operator override fun compareTo(other: Time): Int
Link copied to clipboard
fun format(format: TimeFormat): String
fun format(format: String): String

Converts this date to String using format for representing it.

Link copied to clipboard
operator fun Time.plus(span: TimeSpan): Time
Link copied to clipboard
open override fun toString(): String

Converts this time to String formatting it like "00:00:00.000", "23:59:59.999" or "-23:59:59.999" if the hour is negative