Skip to content

isFuture

isFuture(value: string): boolean

Return true when value is strictly after today, per the system clock and system timeZone.

  • value === today returns 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 use isZonedFuture with an explicit timeZone, or compare against an explicit reference with isAfterDate.
  • Returns false if value is invalid or the system timeZone is unavailable.
ParameterTypeDescription
valuestringISO PlainDate string

true if value is after today, false on invalid input

import { isFuture } from "@northguild/gmt/plain/compare";
isFuture("2024-03-16") // true, if today is 2024-03-15
output 

plain/compare/isFuture.ts