isZonedFuture
Signature
Section titled “Signature”isZonedFuture(value: string): booleanimport { isZonedFuture } from "@northguild/gmt/zoned/compare";Return true when value represents an instant strictly after now.
- Unlike the plain
isFuture, which compares calendar days, this compares the exact instantvaluerepresents againstTemporal.Now.instant()—valuecarries a full time-of-day, not just a date. value === now(to the precision available) returns false — “future” means strictly after, not on-or-after.- Returns false if
valueis invalid.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
ISO ZonedDateTime string |
Returns
Section titled “Returns”true if value is after the current instant, false on invalid input
Examples
Section titled “Examples”isZonedFuture("2999-01-01T00:00:00Z[UTC]") // true (an instant in the distant future)isZonedFuture("2020-01-01T00:00:00Z[UTC]") // false (an instant in the distant past)isZonedFuture("invalid") // false