Skip to content

BirthdateGenerator generator

Generate a date of birth within configurable minimum and maximum ages.

Why: Use BirthdateGenerator when a person's date of birth must satisfy an inclusive age range at the run's reference date; use DateTimeGenerator for dates that are not age-derived.

Category: person.

Output: datetime.

1
<key name="value" generator="BirthdateGenerator(min_age=18, max_age=67)"/>

Parameters

  • min_age: int; Default 1 — Inclusive minimum age represented by the generated birthdate.
  • max_age: int; Default 100 — Inclusive maximum age represented by the generated birthdate.