Skip to main content
Module

x/date_fns/index.js>isValid

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

Examples

// For the valid date: var result = isValid(new Date(2014, 1, 31)) //=> true

// For the value, convertable into a date: var result = isValid(1393804800000) //=> true

// For the invalid date: var result = isValid(new Date('')) //=> false

Parameters

dirtyDate
  • the date to check