parseMillisecondFromTime
Signature
Section titled “Signature”parseMillisecondFromTime(value: string): stringimport { parseMillisecondFromTime } from "@northguild/gmt/plain/parse";Return the millisecond (0-999) for a given ISO 8601 time string.
- Returns zero-padded string for millisecond.
- Returns “” for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
ISO time string |
Returns
Section titled “Returns”Millisecond (000-999) or “” on invalid input
Examples
Section titled “Examples”parseMillisecondFromTime("12:30:45.123") // "123"parseMillisecondFromTime("12:30:45.000") // "000"parseMillisecondFromTime("invalid") // ""