DateTimeGenerator generator¶
Generate fixed, ranged, weighted, offset, or reference-relative date-time values.
Why: Use DateTimeGenerator to model bounded, deterministic date-time requirements such as ranges, business-hour weighting, offsets, and dependencies on another field.
Category: core.
Output: datetime | int.
1 | |
Parameters¶
min:str | null; DefaultNoneβ Inclusive lower date-time bound parsed with input_format when supplied.max:str | null; DefaultNoneβ Inclusive upper date-time bound parsed with input_format when supplied.value:str | null; DefaultNoneβ Fixed date-time value; incompatible with random or offset modes.random:bool | null; DefaultFalseβ Whether to draw a value from the configured bounded window.random_mode:bool | null; DefaultNoneβ Explicit alias for selecting random-window generation.input_format:str | null; DefaultNoneβ Python datetime format used to parse min, max, and value strings.hour_weights:list[float] | null; DefaultNoneβ Twenty-four relative weights controlling hour-of-day selection.minute_weights:list[float] | null; DefaultNoneβ Sixty relative weights controlling minute selection.second_weights:list[float] | null; DefaultNoneβ Sixty relative weights controlling second selection.month_weights:list[float] | null; DefaultNoneβ Twelve relative weights controlling month selection.weekday_weights:list[float] | null; DefaultNoneβ Seven relative weights controlling Monday-through-Sunday selection.dom_weights:list[float] | null; DefaultNoneβ Relative weights controlling valid days of a month.months:str | list[int] | null; DefaultNoneβ Allowed month numbers, ranges, or names used to constrain the window.months_exclude:str | list[int] | null; DefaultNoneβ Month numbers, ranges, or names removed from the allowed window.weekdays:str | list[int | str] | null; DefaultNoneβ Allowed weekday numbers or names.dom:str | list[int | str] | null; DefaultNoneβ Allowed day-of-month values; supports implementation-defined last-day notation.hours_preset:str | null; DefaultNoneβ Named hour window such as business hours.minute_granularity:int | null; DefaultNoneβ Positive minute step to which generated values are aligned.second_granularity:int | null; DefaultNoneβ Positive second step to which generated values are aligned.offset:str | null; DefaultNoneβ ISO 8601 duration or arithmetic offset applied to the base value.max_offset:str | null; DefaultNoneβ Maximum offset used when a bounded random offset is required.reference:str | null; DefaultNoneβ Field reference whose resolved date-time becomes the offset base.as_epoch:bool; DefaultFalseβ Whether to return an integer epoch instead of a datetime value.epoch_unit:str; Defaultsecondsβ Epoch precision: seconds or milliseconds.