Describe the bug
A clear and concise description of what the bug is.
I just wanted to know if it's possible with Dayjs to Convert HH:MM:SS string to seconds. and if it's not possible would you consider implementing this feature? (I'm available for this feature)
The feature can be used like this:
const duration = dayjs.duration( '02:04:33', 'HH:mm:ss');
and the function would return something like the following:
const d = '02:04:33'; // your input string
const a = hms.split(':'); // split it at the colons
const result = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
console.log(result);
Describe the bug
A clear and concise description of what the bug is.
I just wanted to know if it's possible with Dayjs to Convert HH:MM:SS string to seconds. and if it's not possible would you consider implementing this feature? (I'm available for this feature)
The feature can be used like this:
and the function would return something like the following: