@navy.gif/timestring
Version:
Parse a human readable time string into a time based value
23 lines (19 loc) • 431 B
TypeScript
/** Declaration file generated by dts-gen */
export = timestring;
type ReturnUnit =
'ms' |
's' |
'm' |
'h' |
'd' |
'w' |
'th' |
'y'
type TimestringOptions = {
hoursPerDay?: number
daysPerWeek?: number
weeksPerMonth?: number
monthsPerYear?: number
daysPerYear?: number
}
declare function timestring(string: string, returnUnit?: ReturnUnit, opts?: TimestringOptions): number;