areDateTimesEqual
Signature
Section titled “Signature”areDateTimesEqual(value1: string, value2: string): booleanReturn 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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value1 | string | first ISO PlainDateTime string |
value2 | string | second ISO PlainDateTime string |
Returns
Section titled “Returns”boolean indicating whether both date-times are equal component-wise
Examples
Section titled “Examples”import { areDateTimesEqual } from "@northguild/gmt/plain/compare";
areDateTimesEqual("2024-02-29T12:34:56", "2024-02-29T12:34:56") // true