@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 • 554 B
TypeScript
/**
* Return the millisecond (0-999) for a given ISO 8601 datetime string.
*
* - Returns zero-padded string for millisecond.
* - Returns "" for invalid input.
*
* @param value ISO datetime string
* @returns Millisecond (000-999) or "" on invalid input
*
* @example parseMillisecondFromDateTime("2024-03-15T14:30:45.123") // "123"
* @example parseMillisecondFromDateTime("2024-03-15T14:30:45.000") // "000"
* @example parseMillisecondFromDateTime("invalid") // ""
*/
export declare function parseMillisecondFromDateTime(value: string): string;