//core/io.islandtime.ranges/randomOrNull
randomOrNull¶
common
fun DateRange.randomOrNull(): Date?
Returns a random date within this range using the default random number generator or null
if the interval is empty or unbounded.
See also¶
common
DateRange.random |
common
fun DateRange.randomOrNull(random: Random): Date?
Returns a random date within this range using the supplied random number generator or null
if the interval is empty or unbounded.
See also¶
common
DateRange.random |
common
fun DateTimeInterval.randomOrNull(): DateTime?
Returns a random date within this interval using the default random number generator or null
if the interval is empty or unbounded.
See also¶
common
DateTimeInterval.random |
common
fun DateTimeInterval.randomOrNull(random: Random): DateTime?
Returns a random date within this interval using the supplied random number generator or null
if the interval is empty or unbounded.
See also¶
common
DateTimeInterval.random |
common
fun OffsetDateTimeInterval.randomOrNull(): OffsetDateTime?
Returns a random date within this interval using the default random number generator or null
if the interval is empty or unbounded. The offset of the start date-time will be used.
See also¶
common
OffsetDateTimeInterval.random |
common
fun OffsetDateTimeInterval.randomOrNull(random: Random): OffsetDateTime?
Returns a random date within this interval using the supplied random number generator or null
if the interval is empty or unbounded. The offset of the start date-time will be used.
See also¶
common
OffsetDateTimeInterval.random |
common
fun ZonedDateTimeInterval.randomOrNull(): ZonedDateTime?
Returns a random date within this interval using the default random number generator or null
if the interval is empty or unbounded. The zone of the start date-time will be used.
See also¶
common
ZonedDateTimeInterval.random |
common
fun ZonedDateTimeInterval.randomOrNull(random: Random): ZonedDateTime?
Returns a random date within this interval using the supplied random number generator or null
if the interval is empty or unbounded. The zone of the start date-time will be used.
See also¶
common
ZonedDateTimeInterval.random |
common
fun InstantInterval.randomOrNull(): Instant?
Returns a random date within this interval using the default random number generator or null
if the interval is empty or unbounded.
See also¶
common
InstantInterval.random |
common
fun InstantInterval.randomOrNull(random: Random): Instant?
Returns a random date within this interval using the supplied random number generator or null
if the interval is empty or unbounded.
See also¶
common
InstantInterval.random |