areZonedEqual
Signature
Section titled “Signature”areZonedEqual(value1: string, value2: string): booleanCompare two zoned datetime strings for exact local-field equality.
- Inputs must be valid ISO 8601 zoned datetime strings.
- Returns
truewhen year/month/day/hour/minute/second/millisecond/microsecond/nanosecond and IANA timeZone id all match; otherwisefalse. - Invalid inputs return
false.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value1 | string | first zoned datetime string |
value2 | string | second zoned datetime string |
Returns
Section titled “Returns”boolean indicating whether the two zoned datetimes are equal
Examples
Section titled “Examples”import { areZonedEqual } from "@northguild/gmt/zoned/compare";
areZonedEqual("2024-02-29T12:34:56.789+00:00[UTC]", "2024-02-29T12:34:56.789+00:00[UTC]") // true