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

x/date_fns/index.js>isValid

date-fns Deno package
Very Popular
Go to Latest
function isValid
import { isValid } from "https://deno.land/x/date_fns@v2.0.0-beta.2/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