Function edm_core::datetime::parse_duration
source · pub fn parse_duration(input: &str) -> Result<Duration, ParseDurationError>Expand description
Parses a duration from a string.
The input string is specified as an integer followed immediately by one of the following units:
ms- millisecondss- secondsm- minutesh- hoursd- daysw- weeks
Units must be ordered from the longest to the shortest, and a given unit must only appear once in a time duration.