Skip to main content

duration_micros

Function duration_micros 

Source
pub fn duration_micros(text: &str) -> Result<i64, &'static str>
Expand description

An ISO 8601 duration (P1DT2H, PT0.5S, -PT1M, P1W) in whole microseconds, a day being 24 hours and a week 7 days (decision 139).

§Errors

Why it isn’t one, without quoting it: not ISO 8601, in years or months (they aren’t fixed lengths), or too long.