months

val Int.months: Duration

Returns a Duration equal to this Int number of months.

Example:

2.months // 60.days

Since

1.1.0


val Long.months: Duration

Returns a Duration equal to this Long number of months.

Example:

2L.months // 60.days

Since

1.1.0


val Double.months: Duration

Returns a Duration equal to this Double number of months.

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

Example:

2.0.months // 60.days

Since

1.1.0

Throws

IllegalArgumentException

if this Double value is NaN.