Package io.islandtime.jvm

Various extensions specific to the Java platform.

Functions

asIslandClock
Link copied to clipboard

Makes this clock compatible with Island Time's Clock interface.

@JvmName(name = "toIslandClock")
fun Clock.asIslandClock(): Clock
now
Link copied to clipboard

Gets the current Instant from the provided clock.

fun Instant.Companion.now(clock: Clock): Instant

Gets the current Year from the provided clock.

fun Year.Companion.now(clock: Clock): Year

Gets the current YearMonth from the provided clock.

fun YearMonth.Companion.now(clock: Clock): YearMonth

Gets the current Date from the provided clock.

fun Date.Companion.now(clock: Clock): Date

Gets the current DateTime from the provided clock.

fun DateTime.Companion.now(clock: Clock): DateTime

Gets the current OffsetDateTime from the provided clock.

fun OffsetDateTime.Companion.now(clock: Clock): OffsetDateTime

Gets the current ZonedDateTime from the provided clock.

fun ZonedDateTime.Companion.now(clock: Clock): ZonedDateTime

Gets the current Time from the provided clock.

fun Time.Companion.now(clock: Clock): Time

Gets the current OffsetTime from the provided clock.

fun OffsetTime.Companion.now(clock: Clock): OffsetTime
toIslandDate
Link copied to clipboard

Converts this date to an equivalent Island Time Date.

fun LocalDate.toIslandDate(): Date
toIslandDateTime
Link copied to clipboard

Converts this date-time to an equivalent Island Time DateTime.

fun LocalDateTime.toIslandDateTime(): DateTime
toIslandDuration
Link copied to clipboard

Converts this duration to an equivalent Island Time Duration.

fun Duration.toIslandDuration(): Duration
toIslandInstant
Link copied to clipboard

Converts this instant to an equivalent Island Time Instant.

fun Instant.toIslandInstant(): Instant
toIslandOffsetDateTime
Link copied to clipboard

Converts this date-time to an equivalent Island Time OffsetDateTime.

fun OffsetDateTime.toIslandOffsetDateTime(): OffsetDateTime
toIslandOffsetTime
Link copied to clipboard

Converts this time to an equivalent Island Time OffsetTime.

fun OffsetTime.toIslandOffsetTime(): OffsetTime
toIslandPeriod
Link copied to clipboard

Converts this period to an equivalent Island Time Period.

fun Period.toIslandPeriod(): Period
toIslandTime
Link copied to clipboard

Converts this time to an equivalent Island Time Time.

fun LocalTime.toIslandTime(): Time
toIslandTimeZone
Link copied to clipboard

Converts this time zone to an equivalent Island Time TimeZone.

fun ZoneId.toIslandTimeZone(): TimeZone
toIslandUtcOffset
Link copied to clipboard

Converts this UTC offset to an equivalent Island Time UtcOffset.

fun ZoneOffset.toIslandUtcOffset(): UtcOffset
toIslandYear
Link copied to clipboard

Converts this year to an equivalent Island Time Year.

fun Year.toIslandYear(): Year
toIslandYearMonth
Link copied to clipboard

Converts this year-month to an equivalent Island Time YearMonth.

fun YearMonth.toIslandYearMonth(): YearMonth
toIslandZonedDateTime
Link copied to clipboard

Converts this date-time to an equivalent Island Time ZonedDateTime.

fun ZonedDateTime.toIslandZonedDateTime(): ZonedDateTime
toJavaDuration
Link copied to clipboard

Converts this duration to an equivalent Java Duration.

fun Duration.toJavaDuration(): Duration
fun IntDays.toJavaDuration(): Duration
fun LongDays.toJavaDuration(): Duration
fun IntHours.toJavaDuration(): Duration
fun LongHours.toJavaDuration(): Duration
fun IntMinutes.toJavaDuration(): Duration
fun LongMinutes.toJavaDuration(): Duration
fun IntSeconds.toJavaDuration(): Duration
fun LongSeconds.toJavaDuration(): Duration
fun IntMilliseconds.toJavaDuration(): Duration
fun LongMilliseconds.toJavaDuration(): Duration
fun IntMicroseconds.toJavaDuration(): Duration
fun LongMicroseconds.toJavaDuration(): Duration
fun IntNanoseconds.toJavaDuration(): Duration
fun LongNanoseconds.toJavaDuration(): Duration
toJavaInstant
Link copied to clipboard

Converts this instant to an equivalent Java Instant.

fun Instant.toJavaInstant(): Instant
toJavaLocalDate
Link copied to clipboard

Converts this date to an equivalent Java LocalDate.

fun Date.toJavaLocalDate(): LocalDate
toJavaLocalDateTime
Link copied to clipboard

Converts this date-time to an equivalent Java LocalDateTime.

fun DateTime.toJavaLocalDateTime(): LocalDateTime
toJavaLocalTime
Link copied to clipboard

Converts this time to an equivalent Java LocalTime.

fun Time.toJavaLocalTime(): LocalTime
toJavaOffsetDateTime
Link copied to clipboard

Converts this date-time to an equivalent Java OffsetDateTime.

fun OffsetDateTime.toJavaOffsetDateTime(): OffsetDateTime
toJavaOffsetTime
Link copied to clipboard

Converts this time to an equivalent Java OffsetTime.

fun OffsetTime.toJavaOffsetTime(): OffsetTime
toJavaPeriod
Link copied to clipboard

Converts this period to an equivalent Java Period.

fun Period.toJavaPeriod(): Period

Converts this duration to an equivalent Java Period.

fun IntCenturies.toJavaPeriod(): Period
fun LongCenturies.toJavaPeriod(): Period
fun IntDecades.toJavaPeriod(): Period
fun LongDecades.toJavaPeriod(): Period
fun IntYears.toJavaPeriod(): Period
fun LongYears.toJavaPeriod(): Period
fun IntMonths.toJavaPeriod(): Period
fun LongMonths.toJavaPeriod(): Period
fun IntWeeks.toJavaPeriod(): Period
fun LongWeeks.toJavaPeriod(): Period
fun IntDays.toJavaPeriod(): Period
fun LongDays.toJavaPeriod(): Period
toJavaYear
Link copied to clipboard

Converts this year to an equivalent Java Year.

fun Year.toJavaYear(): Year
toJavaYearMonth
Link copied to clipboard

Converts this year-month to an equivalent Java YearMonth.

fun YearMonth.toJavaYearMonth(): YearMonth
toJavaZonedDateTime
Link copied to clipboard

Converts this date-time to an equivalent Java ZonedDateTime.

fun ZonedDateTime.toJavaZonedDateTime(): ZonedDateTime
toJavaZoneId
Link copied to clipboard

Converts this time zone to an equivalent Java ZoneId.

fun TimeZone.toJavaZoneId(): ZoneId
toJavaZoneOffset
Link copied to clipboard

Converts this UTC offset to an equivalent Java ZoneOffset.

fun UtcOffset.toJavaZoneOffset(): ZoneOffset