UNPKG

@burglekitt/gmt

Version:

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

15 lines (14 loc) 507 B
/** * Return the second (0-59) for a given ISO 8601 datetime string. * * - Returns zero-padded string for second. * - Returns "" for invalid input. * * @param value ISO datetime string * @returns Second (00-59) or "" on invalid input * * @example parseSecondFromDateTime("2024-03-15T14:30:45") // "45" * @example parseSecondFromDateTime("2024-03-15T14:30:00") // "00" * @example parseSecondFromDateTime("invalid") // "" */ export declare function parseSecondFromDateTime(value: string): string;