fn fill_pdt_interval_pg(
    actual: &mut VecDeque<TimeStrToken>,
    time_unit: DateTimeField,
    pdt: &mut ParsedDateTime
) -> Result<(), String>
Expand description

Fills a ParsedDateTime’s fields for a single PostgreSQL-style interval parts, e.g. 1 month. Invoke this function once for each PostgreSQL-style interval part.

Note that:

  • This function only meaningfully parses the numerical component of the string, and relies on determining the DateTimeField component from AnnotatedIntervalPart, passed in as time_unit.
  • Only PostgreSQL-style parts can use fractional components in positions other than seconds, e.g. 1.5 months.