Skip to content
masterclass Buddy

Pydantic · Type Alias

PastDate

PastDatetime and FutureDatetime constrain a datetime by its relation to the validation time. Use them to require a past or future value.

Last updated

Syntax

from pydantic import FutureDatetime

class Model(BaseModel):
    value: FutureDatetime

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • PastDate
  • FutureDate
  • AwareDatetime
  • NaiveDatetime
  • datetime
  • Field

Source: Types/datetime | Pydantic Docs. Checked 2026-11-03.