isFuture()function

isFuture(target: PossibleDate, current?: PossibleDate, caller: AnyCaller = isFuture): boolean
ParamType
targetPossibleDate
Date to test. required
currentPossibleDate
Date to test against (defaults to now).
callerAnyCaller
Function to attribute a thrown error to (defaults to isFuture itself). Defaults to isFuture
Return
boolean
true if target is after current.
Throws
RequiredError
If target or current cannot be converted to a valid date.

Is a date in the future?

Examples

isFuture("2099-01-01") // true