diff --git a/time/src/parsing/component.rs b/time/src/parsing/component.rs index 549ef88b0..8149f968b 100644 --- a/time/src/parsing/component.rs +++ b/time/src/parsing/component.rs @@ -66,7 +66,7 @@ pub(crate) fn parse_year( None } else { let ParsedItem(input, year) = - exactly_n_digits_padded::<2, u32>(modifiers.padding)(input)?; + n_to_m_digits_padded::<1, 2, u32>(modifiers.padding)(input)?; Some(ParsedItem(input, (year.cast_signed(), false))) } }