UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

15 lines (14 loc) 548 B
/** * Return the nanosecond (0-999) for a given ISO 8601 datetime string. * * - Returns zero-padded string for nanosecond. * - Returns "" for invalid input. * * @param value ISO datetime string * @returns Nanosecond (000-999) or "" on invalid input * * @example parseNanosecondFromDateTime("2024-03-15T14:30:45.123") // "123" * @example parseNanosecondFromDateTime("2024-03-15T14:30:45.000") // "000" * @example parseNanosecondFromDateTime("invalid") // "" */ export declare function parseNanosecondFromDateTime(value: string): string;