archaeo_super_prompt.dataset.normalization.intervention_date.duration
source module archaeo_super_prompt.dataset.normalization.intervention_date.duration
Transforming functions to get a normalized duration of an excavation.
Functions
-
parse_duration — Return a numeric duration, if possible.
source parse_duration(duration: int | str | None) → Duration | str | None
Return a numeric duration, if possible.
If the value is null-like, then return None, if the value can be parsed, then return a Duration object. Else, return the unparsed string.