detectAndParse
Detect the style then parse the value to return a period.
Return
the parsed period
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 period.
Return
the parsed period
Parameters
value
the value to parse
unit
the period 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