constrained_dates#

polyfactory.value_generators.constrained_dates.handle_constrained_date(faker: Faker, ge: date | None = None, gt: date | None = None, le: date | None = None, lt: date | None = None, tz: tzinfo = datetime.timezone.utc) date#

Generates a date value fulfilling the expected constraints.

Parameters:
  • faker – An instance of faker.

  • lt – Less than value.

  • le – Less than or equal value.

  • gt – Greater than value.

  • ge – Greater than or equal value.

  • tz – A timezone.

Returns:

A date instance.