core / io.islandtime.ranges / periodBetween

periodBetween

(iosArm64, iosX64, jvm, macosX64) fun periodBetween(start: Date, endExclusive: Date): Period

Get the Period between two dates.

(iosArm64, iosX64, jvm, macosX64) fun periodBetween(start: DateTime, endExclusive: DateTime): Period

Get the Period between two date-times, assuming they're in the same time zone.

(iosArm64, iosX64, jvm, macosX64) fun periodBetween(start: OffsetDateTime, endExclusive: OffsetDateTime): Period

Get the Period between two date-times, ignoring the offsets.

(iosArm64, iosX64, jvm, macosX64) fun periodBetween(start: ZonedDateTime, endExclusive: ZonedDateTime): Period

Get the Period between two zoned date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.