Kotest Kotlinx DateTime Gens
Kotest provides an optional module that provides generators for KotlinX DateTime.
Kotest provides an optional module that provides generators for KotlinX DateTime.
NOTE
To use it, add `io.kotest.extensions:kotest-property-datetime:version` to your build.
| Generator | Description | JVM | JS | Native |
|---|---|---|---|---|
Arb.date(yearRange) |
Randomly generates a LocalDate with a year in the given range and other fields. |
✓ | ✓ | ✓ |
Arb.datetime(yearRange, hourRange, minuteRange, secondRange) |
Generates LocalDateTime values using all fields from the given ranges. |
✓ | ✓ | ✓ |
Arb.instant(range) |
Generates Instant values with epochs randomly generated from the given range. |
✓ | ✓ | ✓ |