Skip to main content

isDate

Validates if the supplied input is a date (Date instance).

Signature

isDate(input: any): boolean

Parameters

NameTypeOptionalDescription
inputanyNoInput to validate.

Return value

Returns true if the input is a date.

Example

import { isDate } from "@tripetto/runner";

isDate(new Date()); // Returns `true`