@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 • 460 B
TypeScript
/**
* Return the second (0-59) for a given ISO 8601 time string.
*
* - Returns zero-padded string for second.
* - Returns "" for invalid input.
*
* @param value ISO time string
* @returns Second (00-59) or "" on invalid input
*
* @example parseSecondFromTime("12:30:45") // "45"
* @example parseSecondFromTime("12:00:00") // "00"
* @example parseSecondFromTime("invalid") // ""
*/
export declare function parseSecondFromTime(value: string): string;