Time
Time formatting helpers.
Functions¶
formatClock()¶
Defined in: src/shared/format/time.ts:23
Formats seconds as m:ss (or h:mm:ss) for cue timestamps.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
seconds |
number |
The time in seconds. |
Returns¶
string
A short clock string.
toSec()¶
Defined in: src/shared/format/time.ts:11
Converts an SRT time string "hh:mm:ss,ms" to seconds.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
t |
string |
The SRT timestamp. |
Returns¶
number
Seconds.