MCPcopy Create free account
hub / github.com/code100x/cms / formatTime

Function formatTime

src/lib/utils.ts:20–26  ·  view source on GitHub ↗
(seconds: number)

Source from the content-addressed store, hash-verified

18 title: string;
19}
20export const formatTime = (seconds: number): string => {
21 const date = new Date(seconds * 1000);
22 const hh = date.getUTCHours();
23 const mm = date.getUTCMinutes();
24 const ss = String(date.getUTCSeconds()).padStart(2, '0');
25 return hh ? `${hh}:${String(mm).padStart(2, '0')}:${ss}` : `${mm}:${ss}`;
26};
27
28export const generateCompleteSegments = (
29 userSegments: Segment[],

Callers 3

VideoContentChaptersFunction · 0.90
ContentCardFunction · 0.90
setCurrentLabelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected