activity.models.age_barrier
Classes
Holds various age barrier approaches available to the period. |
|
Checks the age by exact date. |
|
Checks the age by using the year of the start_date and the age. |
Module Contents
- class activity.models.age_barrier.AgeBarrier[source]
Holds various age barrier approaches available to the period.
- registry: dict[str, type[AgeBarrier]][source]
- classmethod from_name(name: str, *args: object, **kwargs: object) AgeBarrier [source]
- class activity.models.age_barrier.ExactAgeBarrier[source]
Bases:
AgeBarrier
Checks the age by exact date.
The attendee can be 1 year too old (otherwise, the day the attendee is a day older than the max age, he’ll be rejected - in other word the min age is exclusive, the max age is inclusive).
- age(birth_date: datetime.date | datetime.datetime, start_date: datetime.date) int [source]
Calculates the age at the given date.
- class activity.models.age_barrier.YearAgeBarrier[source]
Bases:
AgeBarrier
Checks the age by using the year of the start_date and the age.
In German, we would say this is by “Jahrgang”. The person must be of that age during the year of the start date.