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