isAfterUtc
Signature
Section titled “Signature”isAfterUtc(value1: string, value2: string): booleanimport { isAfterUtc } from "@northguild/gmt/utc/compare";Return whether value1 represents an instant strictly after value2.
- Uses Temporal.Instant.compare for comparison.
- Returns false if either input is invalid.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value1 |
string |
first UTC datetime string |
value2 |
string |
second UTC datetime string |
Returns
Section titled “Returns”true if value1 is after value2, otherwise false
Examples
Section titled “Examples”isAfterUtc("2024-03-17T15:30:45Z", "2024-03-17T14:30:45Z") // trueisAfterUtc("2024-03-17T14:30:45Z", "2024-03-17T14:30:45Z") // falseisAfterUtc("2024-03-17T14:30:45Z", "invalid") // false