fn fill_pdt_from_tokens<'a, E: IntoIterator<Item = &'a TimeStrToken>>(
    pdt: &mut ParsedDateTime,
    actual: &mut VecDeque<TimeStrToken>,
    expected: E,
    leading_field: DateTimeField,
    sign: i64
) -> Result<(), String>
Expand description

Fills a ParsedDateTime’s fields using the actual tokens, starting at leading_field and descending to less significant DateTimeFields.

Errors

  • If actual doesn’t match expected, modulo skippable TimeStrTokens.
  • Setting a field in ParsedDateTime that has already been set.

Panics

  • Trying to advance to the next smallest DateTimeField if you’re currently at DateTimeField::Second.