jiff::fmt::strtime::parse

Function parse_ampm

Source
fn parse_ampm<'i>(input: &'i [u8]) -> Result<(usize, &'i [u8]), Error>
Expand description

Like parse_choice, but specialized for AM/PM.

This exists because AM/PM is common and we can take advantage of the fact that they are both exactly two bytes.