areTimesEqual
Signature
Section titled “Signature”areTimesEqual(value1: string, value2: string): booleanReturn true if two PlainTime ISO strings represent the same time components.
- Compares all time components: hour, minute, second, millisecond, microsecond, nanosecond.
- Returns false if either input is invalid.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value1 | string | first ISO PlainTime string |
value2 | string | second ISO PlainTime string |
Returns
Section titled “Returns”boolean indicating whether both times are equal component-wise
Examples
Section titled “Examples”import { areTimesEqual } from "@northguild/gmt/plain/compare";
areTimesEqual("12:34:56", "12:34:56") // true