Skip to content

isDate

Determine whether the input value is a Date.

Usage

ts
import { isDate } from 'rattail'

isDate(new Date()) // return true
isDate('2024-01-01') // return false

Arguments

ArgTypeDefaults
valueany

Return

Type
boolean