//core/io.islandtime.measures/Weeks
Weeks¶
common
value class Weeks(value: Long) : Comparable<Weeks>
Constructors¶
Weeks | common fun Weeks(value: Int) |
Types¶
Name | Summary |
---|---|
Companion | common object Companion |
Functions¶
Name | Summary |
---|---|
compareTo | common open operator override fun compareTo(other: Weeks): Int |
div | common operator fun div(scalar: Int): Weeks operator fun div(scalar: Long): Weeks 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): Days operator fun minus(weeks: Weeks): Weeks |
plus | common operator fun plus(days: Days): Days operator fun plus(weeks: Weeks): Weeks |
rem | common operator fun rem(scalar: Int): Weeks operator fun rem(scalar: Long): Weeks Returns the remainder of this duration divided by a scalar value. |
times | common operator fun times(scalar: Int): Weeks operator fun times(scalar: Long): Weeks Multiplies this duration by a scalar value. @throws ArithmeticException if overflow occurs |
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 |
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(): Weeks Negates this duration. @throws ArithmeticException if overflow occurs |
Properties¶
Name | Summary |
---|---|
absoluteValue | common val absoluteValue: Weeks The absolute value of this duration. @throws ArithmeticException if overflow occurs |
inDays | common val inDays: Days Converts this duration to days. @throws ArithmeticException if overflow occurs |
value | common val value: Long The underlying value. |
Extensions¶
Name | Summary |
---|---|
asPeriod | common fun Weeks.asPeriod(): Period Converts this duration into a Period with the same number of weeks. |
minus | common operator fun Weeks.minus(period: Period): Period |
plus | common operator fun Weeks.plus(period: Period): Period |
toJavaPeriod | jvm fun Weeks.toJavaPeriod(): Period Converts this duration to an equivalent Java Period . |