core / io.islandtime.ranges / ZonedDateTimeInterval / lengthInYears

lengthInYears

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) val lengthInYears: IntYears

Get the number of years between the start and end of the interval. A year is considered to have passed if twelve full months have passed between the start date and end date.

Exceptions

UnsupportedOperationException - if the interval isn't bounded