UNPKG

@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.

17 lines • 735 B
/** * Return true when `value1` is strictly before `value2` for PlainTime values. * * - Uses Temporal.PlainTime.compare to compare times. * - Returns false if either input is invalid. * * @param value1 ISO PlainTime string for the first value * @param value2 ISO PlainTime string for the second value * @returns boolean indicating whether value1 < value2 * * @example isBeforeTime("12:34:56", "13:34:56") // true * @example isBeforeTime("12:34:56", "12:34:56") // false * @example isBeforeTime("13:34:56", "12:34:56") // false * @example isBeforeTime("invalid", "12:34:56") // false * @example isBeforeTime("12:34:56", "invalid") // false */ export declare function isBeforeTime(value1: string, value2: string): boolean;