Numbers & dates

Integers, decimals, booleans, dates, times and sequences. See all field types and the options every field takes.

autoint

Auto-incrementing integer: 1, 2, 3, … Always unique and never empty.

Parameter Values Default Description
start integer 1 First value.
step integer 1 Increment between values.

Also takes the common options.

autoint.yaml
- { name: id, type: autoint, start: 1000 }

integer

Random integer.

Parameter Values Default Description
min number 0 Inclusive lower bound.
max number 100 Inclusive upper bound.

Also takes the common options.

integer.yaml
- { name: score, type: integer, min: 0, max: 10 }

decimal

Random decimal number, rounded to precision places.

Parameter Values Default Description
min number 0 Inclusive lower bound.
max number 1 Inclusive upper bound.
precision integer 2 Digits after the decimal separator.

Also takes the common options.

decimal.yaml
- { name: price, type: decimal, min: 1, max: 999.99, precision: 2 }

boolean

true or false.

Parameter Values Default Description
trueRate number 0.5 Fraction from 0 to 1 of true values.

Also takes the common options.

boolean.yaml
- { name: active, type: boolean, trueRate: 0.8 }

date

Calendar date, written as yyyy-MM-dd. Defaults to 1970-01-01 through 2030-12-31.

Parameter Values Default Description
min text Earliest date, as yyyy-MM-dd.
max text Latest date, as yyyy-MM-dd.
range past, future past: the last 10 years up to now. future: from now to 10 years ahead. min/max override either end.

Also takes the common options.

date.yaml
- { name: birthdate, type: date, min: "1950-01-01", max: "2005-12-31" }

datetime

Date and time in UTC, written as RFC 3339 (2024-05-01T13:45:10Z). Defaults to one year either side of now.

Parameter Values Default Description
min text Earliest instant, as RFC 3339 or yyyy-MM-dd HH:mm:ss.
max text Latest instant, same forms as min.
range past, future past: the last 10 years up to now. future: from now to 10 years ahead. min/max override either end.

Also takes the common options.

datetime.yaml
- { name: created_at, type: datetime, range: past }

datetimePart

One integer part of a date or time.

Parameter Values Default Description
part year, month, day, hour, minute, second, nanosecond second Which part: year (1970-2100), month (1-12), day (1-31), hour, minute, second or nanosecond.

Also takes the common options.

datetimePart.yaml
- { name: month, type: datetimePart, part: month }

timezoneOffset

UTC offset in hours, in quarter-hour steps from -12 to +14.

Also takes the common options.

timezoneOffset.yaml
- { name: offset, type: timezoneOffset }