Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/date_fns/index.js>isDate

date-fns Deno package
Go to Latest
function isDate
import { isDate } from "https://deno.land/x/date_fns@v2.0.0-beta.2/index.js";

Examples

// For a valid date: var result = isDate(new Date()) //=> true

// For an invalid date: var result = isDate(new Date(NaN)) //=> true

// For some value: var result = isDate('2014-02-31') //=> false

// For an object: var result = isDate({}) //=> false

Parameters

value
  • the value to check