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.

15 lines • 716 B
/** * 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;