isDate
Determine if a value is a Date
124 bytes
Usage
Determine if a value is a Date. Does not check that the input date is valid, only that it is a Javascript Date type.
import * as import _
_ from 'radashi'
import _
_.function isDate(value: unknown): value is Dateexport isDate
Return true if the given value is a Date object.
Instances from other realms are also supported.
isDate(new var Date: DateConstructornew () => Date (+3 overloads)
Date()) // => trueimport _
_.function isDate(value: unknown): value is Dateexport isDate
Return true if the given value is a Date object.
Instances from other realms are also supported.
isDate(12) // => falseimport _
_.function isDate(value: unknown): value is Dateexport isDate
Return true if the given value is a Date object.
Instances from other realms are also supported.
isDate('hello') // => false