isUsDateValid
Mask
stable
Validates an 8-digit unmasked string representing a US calendar date (MMDDYYYY) against real Gregorian rules including leap years.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- unmaskedrequiredstring
- The raw 8-digit string extracted from the mask (MMDDYYYY, no separators). Any other length or non-digit content returns false.
API
Return value
The value returned by this util.
- true when the string encodes a real calendar date in MMDDYYYY format; false otherwise.
Usage
Examples
Ready-to-paste usage snippets.
Valid and invalid US dates