nextTimestampInclusive

fun Random.nextTimestampInclusive(min: Timestamp, max: Timestamp): LocalDateTime(source)

Returns a random LocalDateTime between min (inclusive) and max (inclusive).

Despite the method's name, this method returns a LocalDateTime instead of a Timestamp. As per the documentation of Timestamp, the class LocalDateTime can be seen as a Timestamp of which the Timestamp.value is guaranteed to be valid.