Skip to content

@technobuddha > library > RegExp > Validation

Function: isISODate() ​

ts
function isISODate(text: string): boolean;

Defined in: is-iso-date.ts:17

Determines whether a given string is a valid ISO date.

Parameters ​

ParameterTypeDescription
textstringThe string to test for ISO date format.

Returns ​

boolean

true if the string matches the ISO date format, otherwise false.

Example ​

typescript
isISODate("2023-06-15"); // true
isISODate("15/06/2023"); // false