I’m looking to turn 165 seconds into 2:40 not 0:2:45
The function needs to be able to adapt to how large the seconds value is.
I know there’s infinite ways to do this, but I’m looking for a clean way to do it without any external libraries other than jQuery.
Something like:
[Math.floor(165/60),165%60].join(':')should work. Actually, it’s 2:45 ;~)[edit] based on your comment a function to convert seconds into a (zero padded, hours trimmed) hr:mi:se string