Skip to main content

parse_iso8601

Function parse_iso8601 

Source
pub fn parse_iso8601(s: &str) -> RlgResult<String>
Expand description

Validate s as an RFC 3339 / ISO 8601 timestamp.

Accepts the subset this crate emits: YYYY-MM-DDTHH:MM:SS[.fff…]Z or YYYY-MM-DDTHH:MM:SS[.fff…][+HH:MM|-HH:MM]. Returns the original input on success.

§Errors

Returns RlgError::DateTimeParseError when the string does not match the supported grammar or contains out-of-range components.