isBefore

Calendar
stable

Returns true if date is strictly before comparing by comparing their Unix timestamps.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

date
required
Date
The date to test.
comparing
required
Date
The reference date to compare against.

API

Return value

The value returned by this util.

true when date.getTime() < comparing.getTime(); false otherwise.

Usage

Examples

Ready-to-paste usage snippets.

Compare two dates

typescript