How can I convert seconds to an HH-MM-SS
string using JavaScript?
You can manage to do this without any external JavaScript library with the help of JavaScript Date method like following:
var date = new Date(null);
date.setSeconds(SECONDS); // specify value for SECONDS here
var result = date.toISOString().substr(11, 8);
Or, as per @Frank's comment; a one liner:
new Date(SECONDS * 1000).toISOString().substr(11, 8);