edsnlp.pipes.misc.dates.models
BaseDate [source]
Bases: BaseModel
remove_space [source]
Remove spaces. Useful for coping with ill-formatted PDF extractions.
AbsoluteDate [source]
Bases: BaseDate
to_datetime [source]
Convert the date to a datetime.datetime object.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
tz | The timezone to use. Defaults to None. TYPE: |
note_datetime | The datetime of the note. Used to infer missing parts of the date. TYPE: |
infer_from_context | Whether to infer missing parts of the date from the note datetime. In a (year, month, day) triplet: TYPE: |
default_day | Default day to use when inferring missing parts of the date. TYPE: |
default_month | Default month to use when inferring missing parts of the date. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
Union[datetime, None] | |