core / io.islandtime.ranges / DateRange / lengthInMonths

lengthInMonths

(iosArm64, iosX64, jvm, macosX64) val lengthInMonths: IntMonths

Get the number of months in the range. A month is considered to have passed if the day of the end month is greater than or equal to the day of the start month minus one (as a range is inclusive).

Exceptions

UnsupportedOperationException - if the range isn't bounded