isAfterZoned
Signature
Section titled “Signature”isAfterZoned(value1: string, value2: string): booleanimport { isAfterZoned } from "@northguild/gmt/zoned/compare";Return whether value1 represents an instant strictly after value2.
- Both inputs must be valid zoned ISO 8601 datetime strings.
- Comparison is performed using Temporal.Instant (same instant semantics), so differing timeZone representations but the same instant will compare as equal.
- 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”true if value1 is after value2, otherwise false
Examples
Section titled “Examples”isAfterZoned("2024-02-29T12:34:56.789+00:00[UTC]", "2024-02-29T12:34:56.788+00:00[UTC]") // trueisAfterZoned("invalid", "2024-02-29T12:34:56.789+00:00[UTC]") // false