{ days, hours, mins, secs } time object defaults to 0
Optional
days?: numberOptional
hours?: numberOptional
mins?: numberOptional
secs?: numberOptional
negative: booleanpass true
to allow negative results (default: false)
formatted time string
formatTime({ days: 1, hours: 2, mins: 3, secs: 4 }) // '1d 2h 3m 4s'
formatTime({ days: 1, hours: 2, mins: 3, secs: 4 }, true) // '-1d 2h 3m 4s'
formatTime({ days: 0, hours: 0, mins: 3, secs: 4 }) // '3m 4s'
formatTime({ days: 0, hours: 0, mins: 0, secs: 4 }) // '4s'
formats time object to string with days, hours, minutes and seconds