UNPKG

@burglekitt/gmt

Version:

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

14 lines (13 loc) 397 B
/** * Return the hour (0-23) for a given ISO 8601 time string. * * - Returns zero-padded string for hour. * - Returns "" for invalid input. * * @param value ISO time string * @returns Hour (00-23) or "" on invalid input * * @example parseHourFromTime("12:30:00") // "12" * @example parseHourFromTime("invalid") // "" */ export declare function parseHourFromTime(value: string): string;