parseMillisecondFromUtc
Signature
Section titled “Signature”parseMillisecondFromUtc(value: string): stringimport { parseMillisecondFromUtc } from "@northguild/gmt/utc/parse";Return the millisecond (0-999) from a UTC datetime string.
- Returns zero-padded string for millisecond.
- Returns “” for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
ISO UTC datetime string (e.g., “2024-03-17T14:30:45.123Z”) |
Returns
Section titled “Returns”Millisecond (000-999) or “” on invalid input
Examples
Section titled “Examples”parseMillisecondFromUtc("2024-03-17T14:30:45.123Z") // "123"parseMillisecondFromUtc("invalid") // ""