UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

14 lines • 613 B
/** * Return the microsecond (0-999) from a zoned datetime string. * * - Returns zero-padded string for microsecond. * - Returns "" for invalid input. * * @param value ISO zoned datetime string (e.g., "2024-03-15T14:30:45.123456+00:00[UTC]") * @returns Microsecond (000-999) or "" on invalid input * * @example parseMicrosecondFromZoned("2024-03-15T14:30:45.123+00:00[UTC]") // "000" * @example parseMicrosecondFromZoned("2024-03-15T14:30:45.123456+00:00[UTC]") // "456" * @example parseMicrosecondFromZoned("invalid") // "" */ export declare function parseMicrosecondFromZoned(value: string): string;