random

Returns a random date within this range using the default random number generator.

See also

DateRange.randomOrNull
Link copied to clipboard

fun DateRange.random(): Date

Returns a random date within this range using the supplied random number generator.

See also

DateRange.randomOrNull
Link copied to clipboard

fun DateRange.random(random: Random): Date

Returns a random date within this interval using the default random number generator.

See also

DateTimeInterval.randomOrNull
Link copied to clipboard

fun DateTimeInterval.random(): DateTime

Returns a random date within this interval using the supplied random number generator.

See also

DateTimeInterval.randomOrNull
Link copied to clipboard

fun DateTimeInterval.random(random: Random): DateTime

Returns a random date within this interval using the default random number generator. The offset of the start date-time will be used.

See also

OffsetDateTimeInterval.randomOrNull
Link copied to clipboard

fun OffsetDateTimeInterval.random(): OffsetDateTime

Returns a random date within this interval using the supplied random number generator. The offset of the start date-time will be used.

See also

OffsetDateTimeInterval.randomOrNull
Link copied to clipboard

fun OffsetDateTimeInterval.random(random: Random): OffsetDateTime

Returns a random date within this interval using the default random number generator. The zone of the start date-time will be used.

See also

ZonedDateTimeInterval.randomOrNull
Link copied to clipboard

fun ZonedDateTimeInterval.random(): ZonedDateTime

Returns a random date within this interval using the supplied random number generator. The zone of the start date-time will be used.

See also

ZonedDateTimeInterval.randomOrNull
Link copied to clipboard

fun ZonedDateTimeInterval.random(random: Random): ZonedDateTime

Returns a random date within this interval using the default random number generator.

See also

InstantInterval.randomOrNull
Link copied to clipboard

fun InstantInterval.random(): Instant

Returns a random date within this interval using the supplied random number generator.

See also

InstantInterval.randomOrNull
Link copied to clipboard

fun InstantInterval.random(random: Random): Instant