monthsBetween

Gets the number of whole months between two dates.

fun monthsBetween(start: Date, endExclusive: Date): IntMonths

Gets the number of whole months between two date-times, assuming they're in the same time zone.

fun monthsBetween(start: DateTime, endExclusive: DateTime): IntMonths

Gets the number of whole months between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.

fun monthsBetween(start: OffsetDateTime, endExclusive: OffsetDateTime): IntMonths

Gets the number of whole months between two zoned date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.

fun monthsBetween(start: ZonedDateTime, endExclusive: ZonedDateTime): IntMonths