areDatesEqual
Signature
Section titled “Signature”areDatesEqual(value1: string, value2: string): booleanCompare two ISO date-like strings for equality, ignoring time components.
- Accepts both PlainDate and PlainDateTime strings.
- Extracts date components only for comparison.
- Returns false if either input is invalid.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value1 | string | ISO date-like string |
value2 | string | ISO date-like string |
Returns
Section titled “Returns”true if the dates are equal, false otherwise
Examples
Section titled “Examples”import { areDatesEqual } from "@northguild/gmt/plain/compare";
areDatesEqual("2024-02-29", "2024-02-29T12:34:56") // true