Companion

object Companion

Properties

MAX
Link copied to clipboard
common
val MAX: Years

The largest supported value.

MIN
Link copied to clipboard
common
val MIN: Years

The smallest supported value.

Extensions

between
Link copied to clipboard
common
fun Years.Companion.between(start: Year, endExclusive: Year): Years

Returns the number of years between two years.

fun Years.Companion.between(start: YearMonth, endExclusive: YearMonth): Years

Returns the number of whole years between two year-months.

fun Years.Companion.between(start: Date, endExclusive: Date): Years

Returns the number of whole years between two dates.

fun Years.Companion.between(start: DateTime, endExclusive: DateTime): Years

Returns the number of whole years between two date-times, which are assumed to be in the same time zone.

fun Years.Companion.between(start: OffsetDateTime, endExclusive: OffsetDateTime): Years

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

fun Years.Companion.between(start: ZonedDateTime, endExclusive: ZonedDateTime): Years

Returns the number of whole years between date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.