core / io.islandtime.measures / asPeriod

asPeriod

(iosArm64, iosX64, jvm, macosX64) fun IntYears.asPeriod(): Period

Convert IntYears into a Period with the same number of years

(iosArm64, iosX64, jvm, macosX64) fun IntMonths.asPeriod(): Period

Convert IntMonths into a Period with the same number of months

(iosArm64, iosX64, jvm, macosX64) fun IntWeeks.asPeriod(): Period

Convert IntWeeks into a Period with the same number of weeks

Exceptions

ArithmeticException - if the resulting Period would overflow

(iosArm64, iosX64, jvm, macosX64) fun IntDays.asPeriod(): Period

Convert IntDays into a Period with the same number of days

(iosArm64, iosX64, jvm, macosX64) fun LongYears.asPeriod(): Period

Convert LongYears into a Period with the same number of years

Exceptions

ArithmeticException - if the resulting Period would overflow

(iosArm64, iosX64, jvm, macosX64) fun LongMonths.asPeriod(): Period

Convert LongMonths into a Period with the same number of months

Exceptions

ArithmeticException - if the resulting Period would overflow

(iosArm64, iosX64, jvm, macosX64) fun LongWeeks.asPeriod(): Period

Convert LongWeeks into a Period with the same number of weeks

Exceptions

ArithmeticException - if the resulting Period would overflow

(iosArm64, iosX64, jvm, macosX64) fun LongDays.asPeriod(): Period

Convert LongDays into a Period with the same number of days

Exceptions

ArithmeticException - if the resulting Period would overflow