//core/io.islandtime.measures/Weeks
Weeks¶
common
value class Weeks(val value: Long) : Comparable<Weeks>
Constructors¶
| Weeks | common constructor(value: Int)constructor(value: Long) |
Types¶
| Name | Summary |
|---|---|
| Companion | common object Companion |
Properties¶
| Name | Summary |
|---|---|
| absoluteValue | common val absoluteValue: WeeksThe absolute value of this duration. |
| inDays | common val inDays: DaysConverts this duration to days. |
| value | common val value: LongThe underlying value. |
Functions¶
| Name | Summary |
|---|---|
| asPeriod | common fun Weeks.asPeriod(): PeriodConverts this duration into a Period with the same number of weeks. |
| compareTo | common open operator override fun compareTo(other: Weeks): Int |
| div | common operator fun div(scalar: Int): Weeksoperator fun div(scalar: Long): WeeksReturns this duration divided by a scalar value. |
| minus | common operator fun minus(days: Days): Daysoperator fun minus(weeks: Weeks): Weeks |
| minus | common operator fun Weeks.minus(period: Period): Period |
| plus | common operator fun plus(days: Days): Daysoperator fun plus(weeks: Weeks): Weeks |
| plus | common operator fun Weeks.plus(period: Period): Period |
| rem | common operator fun rem(scalar: Int): Weeksoperator fun rem(scalar: Long): WeeksReturns the remainder of this duration divided by a scalar value. |
| times | common operator fun times(scalar: Int): Weeksoperator fun times(scalar: Long): WeeksMultiplies this duration by a scalar value. |
| toDouble | common fun toDouble(): DoubleConverts this duration to a Double value. |
| toInt | common fun toInt(): IntConverts this duration to an Int value. |
| toJavaPeriod | jvm fun Weeks.toJavaPeriod(): PeriodConverts this duration to an equivalent Java Period. |
| toLong | common fun toLong(): LongConverts this duration to a Long value. |
| toString | common open override fun toString(): StringConverts this duration to an ISO-8601 time interval representation. |
| unaryMinus | common operator fun unaryMinus(): WeeksNegates this duration. |