Skip to main content

parse_extended_ymd

Function parse_extended_ymd 

Source
fn parse_extended_ymd(string: &str) -> Option<(i32, u32, u32)>
Expand description

Parse the ISO 8601 signed extended-year form (±YYYY[Y...]-MM-DD) into raw (year, month, day) components, without validating the calendar date.

The caller must have already verified that string begins with + or -; the year must have at least 4 digits. Returns None if the shape is malformed or any component fails to parse numerically.