Package io. islandtime. ranges
Date ranges, time intervals, and the ability to iterate over them and perform various operations.
Types
DateDayProgression
Link copied to clipboard
DateMonthProgression
Link copied to clipboard
DateRange
Link copied to clipboard
class DateRange(start: Date, endInclusive: Date) : DateDayProgression, Interval<Date> , ClosedRange<Date>
Content copied to clipboard
DateTimeInterval
Link copied to clipboard
class DateTimeInterval(start: DateTime, endExclusive: DateTime) : Interval<DateTime>
Content copied to clipboard
InstantInterval
Link copied to clipboard
class InstantInterval(start: Instant, endExclusive: Instant) : TimePointInterval<Instant> , TimePointProgressionBuilder<Instant>
Content copied to clipboard
OffsetDateTimeInterval
Link copied to clipboard
class OffsetDateTimeInterval(start: OffsetDateTime, endExclusive: OffsetDateTime) : TimePointInterval<OffsetDateTime>
Content copied to clipboard
TimePointInterval
Link copied to clipboard
TimePointNanosecondProgression
Link copied to clipboard
class TimePointNanosecondProgression<T : TimePoint<T>> : TimePointProgressionBuilder<T> , Iterable<T>
Content copied to clipboard
TimePointProgressionBuilder
Link copied to clipboard
TimePointSecondProgression
Link copied to clipboard
class TimePointSecondProgression<T : TimePoint<T>> : TimePointProgressionBuilder<T> , Iterable<T>
Content copied to clipboard
ZonedDateTimeInterval
Link copied to clipboard
class ZonedDateTimeInterval(start: ZonedDateTime, endExclusive: ZonedDateTime) : TimePointInterval<ZonedDateTime>
Content copied to clipboard
Functions
asZonedDateTimeInterval
Link copied to clipboard
fun OffsetDateTimeInterval.asZonedDateTimeInterval(): ZonedDateTimeInterval
Content copied to clipboard
Converts this interval to an equivalent ZonedDateTimeInterval where both endpoints are given a fixed-offset time zone.
at
Link copied to clipboard
Combines this DateRange with a TimeZone to create a ZonedDateTimeInterval between the start of the first day and the end of the last day in zone.
Combines this DateTimeInterval with a TimeZone to create a ZonedDateTimeInterval where both endpoints are in zone.
Combines this InstantInterval with a TimeZone to create an equivalent ZonedDateTimeInterval where both endpoints are in zone.
contains
Link copied to clipboard
daysBetween
Link copied to clipboard
fun daysBetween(start: OffsetDateTime, endExclusive: OffsetDateTime): LongDays
Content copied to clipboard
fun daysBetween(start: ZonedDateTime, endExclusive: ZonedDateTime): LongDays
Content copied to clipboard
downTo
Link copied to clipboard
durationBetween
Link copied to clipboard
hoursBetween
Link copied to clipboard
microsecondsBetween
Link copied to clipboard
fun microsecondsBetween(start: DateTime, endExclusive: DateTime): LongMicroseconds
Content copied to clipboard
fun <T1, T2> microsecondsBetween(start: TimePoint<T1>, endExclusive: TimePoint<T2>): LongMicroseconds
Content copied to clipboard
millisecondsBetween
Link copied to clipboard
fun millisecondsBetween(start: DateTime, endExclusive: DateTime): LongMilliseconds
Content copied to clipboard
fun <T1, T2> millisecondsBetween(start: TimePoint<T1>, endExclusive: TimePoint<T2>): LongMilliseconds
Content copied to clipboard
minutesBetween
Link copied to clipboard
fun <T1, T2> minutesBetween(start: TimePoint<T1>, endExclusive: TimePoint<T2>): LongMinutes
Content copied to clipboard
monthsBetween
Link copied to clipboard
fun monthsBetween(start: OffsetDateTime, endExclusive: OffsetDateTime): IntMonths
Content copied to clipboard
fun monthsBetween(start: ZonedDateTime, endExclusive: ZonedDateTime): IntMonths
Content copied to clipboard
nanosecondsBetween
Link copied to clipboard
fun nanosecondsBetween(start: DateTime, endExclusive: DateTime): LongNanoseconds
Content copied to clipboard
fun <T1, T2> nanosecondsBetween(start: TimePoint<T1>, endExclusive: TimePoint<T2>): LongNanoseconds
Content copied to clipboard
periodBetween
Link copied to clipboard
fun periodBetween(start: OffsetDateTime, endExclusive: OffsetDateTime): Period
Content copied to clipboard
Gets the Period between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
fun periodBetween(start: ZonedDateTime, endExclusive: ZonedDateTime): Period
Content copied to clipboard
Gets the Period between two zoned date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.
random
Link copied to clipboard
randomOrNull
Link copied to clipboard
reversed
Link copied to clipboard
secondsBetween
Link copied to clipboard
fun <T1, T2> secondsBetween(start: TimePoint<T1>, endExclusive: TimePoint<T2>): LongSeconds
Content copied to clipboard
step
Link copied to clipboard
infix fun DateDayProgression.step(step: IntCenturies): DateMonthProgression
Content copied to clipboard
infix fun DateDayProgression.step(step: IntDecades): DateMonthProgression
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: IntDays): TimePointSecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: IntHours): TimePointSecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: IntMicroseconds): TimePointNanosecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: IntMilliseconds): TimePointNanosecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: IntMinutes): TimePointSecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: IntNanoseconds): TimePointNanosecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: IntSeconds): TimePointSecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: LongMicroseconds): TimePointNanosecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: LongMilliseconds): TimePointNanosecondProgression<T>
Content copied to clipboard
infix fun <T : TimePoint<T>> TimePointProgressionBuilder<T>.step(step: LongNanoseconds): TimePointNanosecondProgression<T>
Content copied to clipboard
toDateRange
Link copied to clipboard
fun String.toDateRange(parser: GroupedDateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): DateRange
Content copied to clipboard
Converts a string to a DateRange using a specific parser.
toDateRangeAt
Link copied to clipboard
toDateTimeInterval
Link copied to clipboard
fun String.toDateTimeInterval(parser: GroupedDateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): DateTimeInterval
Content copied to clipboard
Converts a string to a DateTimeInterval using a specific parser.
toDateTimeIntervalAt
Link copied to clipboard
fun InstantInterval.toDateTimeIntervalAt(zone: TimeZone): DateTimeInterval
Content copied to clipboard
toInstantInterval
Link copied to clipboard
fun String.toInstantInterval(parser: GroupedDateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): InstantInterval
Content copied to clipboard
Converts a string to an InstantInterval using a specific parser.
toInstantIntervalAt
Link copied to clipboard
Converts this range to an InstantInterval between the start of the first day and the end of the last day in zone.
fun DateTimeInterval.toInstantIntervalAt(zone: TimeZone): InstantInterval
Content copied to clipboard
toOffsetDateTimeInterval
Link copied to clipboard
fun ZonedDateTimeInterval.toOffsetDateTimeInterval(): OffsetDateTimeInterval
Content copied to clipboard
Converts this interval to an OffsetDateTimeInterval.
fun String.toOffsetDateTimeInterval(parser: GroupedDateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): OffsetDateTimeInterval
Content copied to clipboard
Converts a string to an OffsetDateTimeInterval using a specific parser.
toZonedDateTimeInterval
Link copied to clipboard
fun OffsetDateTimeInterval.toZonedDateTimeInterval(zone: TimeZone, strategy: OffsetConversionStrategy): ZonedDateTimeInterval
Content copied to clipboard
Converts this interval to a ZonedDateTimeInterval using the specified strategy to adjust each endpoint to a valid date, time, and offset in zone.
fun String.toZonedDateTimeInterval(parser: GroupedDateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): ZonedDateTimeInterval
Content copied to clipboard
Converts a string to a ZonedDateTimeInterval using a specific parser.
until
Link copied to clipboard
Creates a DateTimeInterval from this date-time up to, but not including the nanosecond represented by to.
infix fun OffsetDateTime.until(to: OffsetDateTime): OffsetDateTimeInterval
Content copied to clipboard
weeksBetween
Link copied to clipboard
fun weeksBetween(start: OffsetDateTime, endExclusive: OffsetDateTime): LongWeeks
Content copied to clipboard
fun weeksBetween(start: ZonedDateTime, endExclusive: ZonedDateTime): LongWeeks
Content copied to clipboard
yearsBetween
Link copied to clipboard
fun yearsBetween(start: OffsetDateTime, endExclusive: OffsetDateTime): IntYears
Content copied to clipboard
fun yearsBetween(start: ZonedDateTime, endExclusive: ZonedDateTime): IntYears
Content copied to clipboard