weeks

val Int.weeks: Duration

Returns a Duration equal to this Int number of weeks.

Example:

2.weeks // 14.days

Since

1.1.2


val Long.weeks: Duration

Returns a Duration equal to this Long number of weeks.

Example:

2L.weeks // 14.days

Since

1.1.2


val Double.weeks: Duration

Returns a Duration equal to this Double number of weeks.

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

Example:

2.0.weeks // 14.days

Since

1.1.2

Throws

IllegalArgumentException

if this Double value is NaN.