diff --git a/index.test.ts b/index.test.ts index 950b92a..38f135b 100644 --- a/index.test.ts +++ b/index.test.ts @@ -118,7 +118,7 @@ test("parsehhmmss", t => { t.deepEqual(parsehhmmss("3:2.5"), {hours: 0, minutes: 3, seconds: 2.5}); t.deepEqual(parsehhmmss("6:5:1"), {hours: 6, minutes: 5, seconds: 1}); t.deepEqual(parsehhmmss("1:48:23.25"), {hours: 1, minutes: 48, seconds: 23.25}); - t.deepEqual(parsehhmmss("1:62:77"), {hours: 1, minutes: 62, seconds: 77}); + t.deepEqual(parsehhmmss("1:62:77"), {hours: 2, minutes: 3, seconds: 17}); }); test("parsehhmm", t => { diff --git a/index.ts b/index.ts index dbcc276..473001c 100644 --- a/index.ts +++ b/index.ts @@ -98,7 +98,7 @@ export function parsehhmmss(duration: string): Duration | null { ? 0 : parseFloat(matches[3]); - return {hours, minutes, seconds}; + return normalize({hours, minutes, seconds}); } }