Skip to main content

Module relative

Module relative 

Source

Structs§

RelativeMatch

Enums§

RelativeOutcome

Functions§

apply_relative_offset
Calendar-accurate offset addition (matches dateutil.relativedelta semantics for months/years).
extract_trailing_or_leading_time
Extract a trailing time from strings like “yesterday at 5pm”, “hier à 14h30”, “dün saat 15:30”, “어제 오후 2시 30분”, “昨日の14:30”, or “tomorrow at 5”.
try_conversational_clock_or_fraction
Parse standalone fractional relative durations and conversational clock idioms (e.g. “two and a half hours ago”, “bir buçuk saat önce”, “quarter past 3”, “saat 3 buçuk”).
try_parse_relative
Try parsing a normalized lowercase string as a relative date across candidate locales.
try_parse_relative_outcome
Like try_parse_relative, distinguishing calendar underflow/overflow from non-matches so out-of-range relative expressions (e.g. "1 day ago" at 0001-01-01) are not re-parsed as another locale’s absolute month.