hours

Common
JVM
JS
Native
1.0
inline val Int.hours: Duration
(source)

Returns a Duration equal to this Int number of hours.

Common
JVM
JS
Native
1.0
inline val Long.hours: Duration
(source)

Returns a Duration equal to this Long number of hours.

Common
JVM
JS
Native
1.0
inline val Double.hours: Duration
(source)

Returns a Duration equal to this Double number of hours.

Depending on its magnitude, the value is rounded to an integer number of nanoseconds or milliseconds.

Exceptions

IllegalArgumentException - if this Double value is NaN.

Common
JVM
JS
Native
1.5
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun hours(
    value: Int
): Duration

(source)
Deprecated: Use 'Int.hours' extension property from Duration.Companion instead.
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun hours(
    value: Long
): Duration

(source)
Deprecated: Use 'Long.hours' extension property from Duration.Companion instead.

Returns a Duration representing the specified value number of hours.

Common
JVM
JS
Native
1.5
@ExperimentalTime @DeprecatedSinceKotlin("1.6", "1.8", "1.9") fun hours(
    value: Double
): Duration

(source)
Deprecated: Use 'Double.hours' extension property from Duration.Companion instead.

Returns a Duration representing the specified value number of hours.

Exceptions

IllegalArgumentException - if the provided Double value is NaN.