Parse a string containing a list of duration measures separated by whitespaces.
A measure is a number followed by the unit (no whitespace
between is allowed). Every measure is accumulated into a duration. The
string is allowed to contain any number of measures with the same unit in no
particular order.
Parse a string containing a list of duration measures separated by whitespaces.
A measure is a number followed by the unit (no whitespace between is allowed). Every measure is accumulated into a duration. The string is allowed to contain any number of measures with the same unit in no particular order.
The supported units are:
msfor millisecondssfor secondsmfor minuteshfor hoursdfor daysExample
The duration of 10 days, 1 hour, 2 minutes and 7 seconds is:
Throws
The format of the string is not matching the format.
Returns