diff --git a/src/index.ts b/src/index.ts index 7461382..978ae1d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,6 +34,7 @@ function parseTimestamp(s: string): number { } function toTimestamp(n: number): string { + n = Math.floor(n); return `${Math.floor(n / 60) .toString() .padStart(2, "0")}:${(n % 60).toString().padStart(2, "0")}`;