isPast
Calendar
stable
Returns true when the given Date sits in the past relative to the current moment (Date.now()). Includes earlier hours of today. Used to fade or disable past events in calendar and agenda views.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- daterequiredDate
- The date to compare against the current timestamp. The comparison is millisecond-accurate using Date.now().
API
Return value
The value returned by this util.
- true when date.getTime() < Date.now(); false for future dates and the current moment.
Usage
Examples
Ready-to-paste usage snippets.
Checking whether a date is in the past