Skip to main content

parse_range

Function parse_range 

Source
pub(crate) fn parse_range(
    start: &str,
    end: &str,
) -> Result<(DateTime<Utc>, DateTime<Utc>)>
Expand description

Parses an RFC 3339 start/end range into UTC instants.

Does not check the order of the two instants; callers do that.

§Arguments

  • start - Range start, RFC 3339 with any offset.
  • end - Range end, RFC 3339 with any offset.

§Errors

Returns an error naming start or end if either is not valid RFC 3339.