Skip to content

isDate

isDate(value): value is Date

Defined in: packages/core/src/guards/is-date.ts:13

Check if a value is a Date.

A Date holding NaN (an invalid date) still passes — this answers what the value is, not whether it is usable.

Realm-bound: a Date built in another realm (worker, iframe, vm context) is not recognised.

unknown

The value to check

value is Date

True if the value is a Date