@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
16 lines (15 loc) • 717 B
TypeScript
/**
* Return true if two PlainDateTime ISO strings represent the same instant of local date/time components.
*
* - Compares all date and time components.
* - Returns false if either input is invalid.
*
* @param value1 first ISO PlainDateTime string
* @param value2 second ISO PlainDateTime string
* @returns boolean indicating whether both date-times are equal component-wise
*
* @example areDateTimesEqual("2024-02-29T12:34:56", "2024-02-29T12:34:56") // true
* @example areDateTimesEqual("2024-02-29T12:34:56", "2024-02-29T12:34:57") // false
* @example areDateTimesEqual("2024-02-29T12:34:56", "invalid") // false
*/
export declare function areDateTimesEqual(value1: string, value2: string): boolean;