core / io.islandtime.ranges / DateTimeInterval / asPeriod

asPeriod

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

Convert the interval into a Period of the same length.

Exceptions

UnsupportedOperationException - if the interval isn't bounded