@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
14 lines (13 loc) • 493 B
TypeScript
/**
* Return the nanosecond (0-999) from a UTC datetime string.
*
* - Returns zero-padded string for nanosecond.
* - Returns "" for invalid input.
*
* @param value ISO UTC datetime string (e.g., "2024-03-17T14:30:45.123Z")
* @returns Nanosecond (000-999) or "" on invalid input
*
* @example parseNanosecondFromUtc("2024-03-17T14:30:45.123Z") // "123000000"
* @example parseNanosecondFromUtc("invalid") // ""
*/
export declare function parseNanosecondFromUtc(value: string): string;