Closed lqzhgood closed 2 years ago
if any one have same feature, use this
timeHumanize(s) {
const DELIMITER = ' ';
const str = humanizeDuration(s * 1000, { delimiter: DELIMITER });
const reg = new RegExp(`(?<=[hour|minutes|seconds]${DELIMITER})(\\d{1})(?=${DELIMITER})`, 'g');
return str.replace(reg, t => t.padStart(2, '0'));
},
This library is actively maintained but no new features will be added. Sorry!
can add options to padding 0 to align result ?
like this