core / io.islandtime.ranges / random

random

(iosArm64, iosX64, jvm, macosX64) fun DateRange.random(): Date

Return a random date within the range using the default random number generator.

(iosArm64, iosX64, macosX64) fun DateRange.random(random: <ERROR CLASS>): Date

Return a random date within the range using the supplied random number generator.

(iosArm64, iosX64, jvm, macosX64) fun DateTimeInterval.random(): DateTime
fun ZonedDateTimeInterval.random(): ZonedDateTime

Return a random date-time within the interval using the default random number generator.

(iosArm64, iosX64, macosX64) fun DateTimeInterval.random(random: <ERROR CLASS>): DateTime
fun ZonedDateTimeInterval.random(random: <ERROR CLASS>): ZonedDateTime

Return a random date-time within the interval using the supplied random number generator.

(iosArm64, iosX64, jvm, macosX64) fun InstantInterval.random(): Instant

Return a random instant within the interval using the default random number generator.

(iosArm64, iosX64, macosX64) fun InstantInterval.random(random: <ERROR CLASS>): Instant

Return a random instant within the interval using the supplied random number generator.

(iosArm64, iosX64, jvm, macosX64) fun OffsetDateTimeInterval.random(): OffsetDateTime

Return a random date-time within the range using the default random number generator.

(iosArm64, iosX64, macosX64) fun OffsetDateTimeInterval.random(random: <ERROR CLASS>): OffsetDateTime

Return a random date-time within the range using the supplied random number generator.

(jvm) fun DateRange.random(random: Random): Date

Return a random date within the range using the supplied random number generator.

(jvm) fun DateTimeInterval.random(random: Random): DateTime
fun ZonedDateTimeInterval.random(random: Random): ZonedDateTime

Return a random date-time within the interval using the supplied random number generator.

(jvm) fun InstantInterval.random(random: Random): Instant

Return a random instant within the interval using the supplied random number generator.

(jvm) fun OffsetDateTimeInterval.random(random: Random): OffsetDateTime

Return a random date-time within the range using the supplied random number generator.