SyntaxFix
Write A Post
Hire A Developer
Questions
Here is maybe a bit more readable form on the original approved answer.
const getSeconds = (hms: string) : number => { const [hours, minutes, seconds] = hms.split(':'); return (+hours) * 60 * 60 + (+minutes) * 60 + (+seconds); };