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