MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / formatSrtTimestamp

Function formatSrtTimestamp

packages/cli/src/whisper/normalize.ts:280–283  ·  view source on GitHub ↗

Format SRT timestamp: seconds → 00:01:23,456

(seconds: number)

Source from the content-addressed store, hash-verified

278
279/** Format SRT timestamp: seconds → 00:01:23,456 */
280function formatSrtTimestamp(seconds: number): string {
281 const { hours, minutes, wholeSeconds, milliseconds } = timestampParts(seconds);
282 return `${pad2(hours)}:${pad2(minutes)}:${pad2(wholeSeconds)},${pad3(milliseconds)}`;
283}
284
285/** Format VTT timestamp: seconds → 00:01:23.456 */
286function formatVttTimestamp(seconds: number): string {

Callers 1

formatSrtFunction · 0.85

Calls 3

timestampPartsFunction · 0.85
pad3Function · 0.85
pad2Function · 0.70

Tested by

no test coverage detected