fun DateRange.random(): Date
Return a random date within the range using the default random number generator.
NoSuchElementException - if the range is empty
UnsupportedOperationException - if the range is unbounded
See Also
fun DateRange.random(random: <ERROR CLASS>): Date
Return a random date within the range using the supplied random number generator.
NoSuchElementException - if the range is empty
UnsupportedOperationException - if the range is unbounded
See Also
fun DateTimeInterval.random(): DateTime
Return a random date-time within the interval using the default random number generator.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
fun DateTimeInterval.random(random: <ERROR CLASS>): DateTime
Return a random date-time within the interval using the supplied random number generator.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
fun InstantInterval.random(): Instant
Return a random instant within the interval using the default random number generator.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
fun InstantInterval.random(random: <ERROR CLASS>): Instant
Return a random instant within the interval using the supplied random number generator.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
fun OffsetDateTimeInterval.random(): OffsetDateTime
Return a random date-time within the interval using the default random number generator. The offset of the start date-time will be used.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
OffsetDateTimeInterval.randomOrNull
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)fun OffsetDateTimeInterval.random(random: <ERROR CLASS>): OffsetDateTime
Return a random date-time within the interval using the supplied random number generator. The offset of the start date-time will be used.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
OffsetDateTimeInterval.randomOrNull
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)fun ZonedDateTimeInterval.random(): ZonedDateTime
Return a random date-time within the interval using the default random number generator. The zone of the start date-time will be used.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
ZonedDateTimeInterval.randomOrNull
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)fun ZonedDateTimeInterval.random(random: <ERROR CLASS>): ZonedDateTime
Return a random date-time within the interval using the supplied random number generator. The zone of the start date-time will be used.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
ZonedDateTimeInterval.randomOrNull
(jvm)fun DateRange.random(random: Random): Date
Return a random date within the range using the supplied random number generator.
NoSuchElementException - if the range is empty
UnsupportedOperationException - if the range is unbounded
See Also
fun DateTimeInterval.random(random: Random): DateTime
Return a random date-time within the interval using the supplied random number generator.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
fun InstantInterval.random(random: Random): Instant
Return a random instant within the interval using the supplied random number generator.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
fun OffsetDateTimeInterval.random(random: Random): OffsetDateTime
Return a random date-time within the interval using the supplied random number generator. The offset of the start date-time will be used.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also
OffsetDateTimeInterval.randomOrNull
(jvm)fun ZonedDateTimeInterval.random(random: Random): ZonedDateTime
Return a random date-time within the interval using the supplied random number generator. The zone of the start date-time will be used.
NoSuchElementException - if the interval is empty
UnsupportedOperationException - if the interval is unbounded
See Also