parseNanosecondFromUtc
Signature
Section titled “Signature”parseNanosecondFromUtc(value: string): stringimport { parseNanosecondFromUtc } from "@northguild/gmt/utc/parse";Return the nanosecond (0-999) from a UTC datetime string.
- Returns zero-padded string for nanosecond.
- 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”Nanosecond (000-999) or “” on invalid input
Examples
Section titled “Examples”parseNanosecondFromUtc("2024-03-17T14:30:45.123Z") // "123000000"parseNanosecondFromUtc("invalid") // ""