import { isValidDate } from "https://deno.land/x/isx@1.1.1/date/is_valid_date.ts";
Whether the input is valid Date
or not.
Examples
Example 1
Example 1
import { isValidDate } from "https://deno.land/x/isx@$VERSION/date/is_valid_date.ts"
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"
assertEquals(isValidDate(new Date("2000/1/1")), true)
assertEquals(isValidDate(new Date("invalid")), false)
Parameters
input: Date
- Any
Date