shared_libraries.utils#
Shared helper functions.
Functions#
|
Ensure that the input is a UUID or None. |
|
Calculate age in years from a given birth date. |
Module Contents#
- shared_libraries.utils.ensure_uuid(val: str | uuid.UUID | None) → uuid.UUID | None#
Ensure that the input is a UUID or None.
- shared_libraries.utils.calc_age_from_date(birth_date: datetime.date) → int#
Calculate age in years from a given birth date.
- Parameters:
birth_date – Date of birth
- Return type:
Age in years as int