isValidDateString
Checks whether a string can be parsed into a valid Date.
Uses the native Date constructor. Returns false for empty strings
and any string that produces an Invalid Date.
Caveat: The native parser is lenient and implementation-dependent for non-ISO formats. For strict format validation, prefer a dedicated library or manual regex checks.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
input | string | The string to validate |
Returns
Section titled “Returns”boolean — true if new Date(input) produces a valid date
