//core/io.islandtime.measures/Hours
Hours¶
common
value class Hours(value: Long) : Comparable<Hours>
Constructors¶
Hours | common fun Hours(value: Int) |
Types¶
Name | Summary |
---|---|
Companion | common object Companion |
Functions¶
Name | Summary |
---|---|
compareTo | common open operator override fun compareTo(other: Hours): Int |
div | common operator fun div(scalar: Int): Hours operator fun div(scalar: Long): Hours Returns this duration divided by a scalar value. @throws ArithmeticException if overflow occurs or the scalar is zero |
minus | common operator fun minus(days: Days): Hours operator fun minus(hours: Hours): Hours operator fun minus(microseconds: Microseconds): Microseconds operator fun minus(milliseconds: Milliseconds): Milliseconds operator fun minus(minutes: Minutes): Minutes operator fun minus(nanoseconds: Nanoseconds): Nanoseconds operator fun minus(seconds: Seconds): Seconds |
plus | common operator fun plus(days: Days): Hours operator fun plus(hours: Hours): Hours operator fun plus(microseconds: Microseconds): Microseconds operator fun plus(milliseconds: Milliseconds): Milliseconds operator fun plus(minutes: Minutes): Minutes operator fun plus(nanoseconds: Nanoseconds): Nanoseconds operator fun plus(seconds: Seconds): Seconds |
rem | common operator fun rem(scalar: Int): Hours operator fun rem(scalar: Long): Hours Returns the remainder of this duration divided by a scalar value. |
times | common operator fun times(scalar: Int): Hours operator fun times(scalar: Long): Hours Multiplies this duration by a scalar value. @throws ArithmeticException if overflow occurs |
toComponents | common inline fun <T> toComponents(action: (days: Days, hours: Hours) -> T): T |
toComponentValues | common inline fun <T> toComponentValues(action: (days: Long, hours: Int) -> T): T |
toDouble | common fun toDouble(): Double Converts this duration to a Double value. |
toInt | common fun toInt(): Int Converts this duration to an Int value. @throws ArithmeticException if overflow occurs |
toKotlinDuration | common fun toKotlinDuration(): Duration Converts this duration to a kotlin.time.Duration. |
toLong | common fun toLong(): Long Converts this duration to a Long value. |
toString | common open override fun toString(): String Converts this duration to an ISO-8601 time interval representation. |
unaryMinus | common operator fun unaryMinus(): Hours Negates this duration. @throws ArithmeticException if overflow occurs |
Properties¶
Name | Summary |
---|---|
absoluteValue | common val absoluteValue: Hours The absolute value of this duration. @throws ArithmeticException if overflow occurs |
inMicroseconds | common val inMicroseconds: Microseconds Converts this duration to microseconds. @throws ArithmeticException if overflow occurs |
inMilliseconds | common val inMilliseconds: Milliseconds Converts this duration to milliseconds. @throws ArithmeticException if overflow occurs |
inMinutes | common val inMinutes: Minutes Converts this duration to minutes. @throws ArithmeticException if overflow occurs |
inNanoseconds | common val inNanoseconds: Nanoseconds Converts this duration to nanoseconds. @throws ArithmeticException if overflow occurs |
inSeconds | common val inSeconds: Seconds Converts this duration to seconds. @throws ArithmeticException if overflow occurs |
inWholeDays | common val inWholeDays: Days Converts this duration to the number of whole days. |
value | common val value: Long The underlying value. |
Extensions¶
Name | Summary |
---|---|
asDuration | common fun Hours.asDuration(): Duration |
asUtcOffset | common fun Hours.asUtcOffset(): UtcOffset Converts a duration of hours into a UtcOffset of the same length. |
toJavaDuration | jvm fun Hours.toJavaDuration(): Duration Converts this duration to an equivalent Java Duration . |
toNSTimeInterval | darwin fun Hours.toNSTimeInterval(): <ERROR CLASS> Converts this duration to an equivalent NSTimeInterval . |