pub fn parse_interval_text(s: &str) -> Option<(i32, i32, i64)>Expand description
Parse the text inside INTERVAL '...' into (months, micros). Accepts
one or more <n> <unit> pairs separated by whitespace. <n> may be
negative. Returns None if any pair fails to parse or no pair is found.
Recognised units (case-insensitive, optional trailing s):
microsecond, millisecond, second, minute, hour, day, week,
month, year. week widens to 7 days; year widens to 12 months.
v7.37.5 β — returns (months, days, micros). days is preserved
as its own dimension so INTERVAL '1 day' ≠ INTERVAL '24 hours'
(PG-canonical: DST and month-boundary semantics depend on this).
week rolls into days (× 7). Sub-day units flow into micros.