isFuture
Signature
Section titled “Signature”isFuture(value: string): booleanimport { isFuture } from "@northguild/gmt/plain/compare";Return true when value is strictly after today, per the system clock
- and system timeZone.
value === todayreturns false — “future” means strictly after, not on-or-after.- Compares against
getToday(), so this depends on the system clock and system timeZone. A caller needing determinism should useisZonedFuturewith an explicit timeZone, or compare against an explicit reference withisAfterDate. - Returns false if
valueis invalid or the system timeZone is unavailable.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
ISO PlainDate string |
Returns
Section titled “Returns”true if value is after today, false on invalid input
Examples
Section titled “Examples”isFuture("2024-03-16") // true, if today is 2024-03-15isFuture("2024-03-15") // false, if today is 2024-03-15 (equal is not future)isFuture("2024-03-14") // false, if today is 2024-03-15isFuture("invalid") // false