Function mz_repr::strconv::parse_interval

source ยท
pub fn parse_interval(s: &str) -> Result<Interval, ParseError>
Expand description

parse

<unquoted interval string> ::=
  [ <sign> ] { <year-month literal> | <day-time literal> }
<year-month literal> ::=
    <years value> [ <minus sign> <months value> ]
  | <months value>
<day-time literal> ::=
    <day-time interval>
  | <time interval>
<day-time interval> ::=
  <days value> [ <space> <hours value> [ <colon> <minutes value>
      [ <colon> <seconds value> ] ] ]
<time interval> ::=
    <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
  | <minutes value> [ <colon> <seconds value> ]
  | <seconds value>