Function humanize_rs::duration::parse

source ·
pub fn parse(s: &str) -> Result<Duration, ParseError>
Expand description

parse a duration-type string, (e.g. “1h”, “1h 30m”)

Example

use humanize_rs::duration::parse;


let d = parse("1h 30m").unwrap();
println!("{:?}", d);