detectAndParse
Detect the style then parse the value to return a duration.
Return
the parsed duration
Parameters
value
the value to parse
Throws
if the value is not a known style or cannot beparsed
Detect the style then parse the value to return a duration.
Return
the parsed duration
Parameters
value
the value to parse
unit
the duration unit to use if the value doesn't specify one (null
will default to ms)
Throws
if the value is not a known style or cannot beparsed