time-string-parser
Converts an arbitrary string of an amount of time to other units of time. You can use any of the conventional spellings/abbreviations of time units.
Ex: 10 weeks/wks, 14 hours/hrs/H
The function takes 2 arguments:
string
: your time string
number
: number of digits to appear after decimal point (optional, default is 2)
example
var timestring = console// 97console// 296console// 2940console// 75.40console// 61440console// 302400console// 8128000console// 0.0095063565