Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const isDateString

  • isDateString(val: string): boolean
  • Checks for a valid date string.

    Matches m/d/yy, m-d-yy, mm/dd/yyyy and mm/dd/yyyy, allowing any combination of one or two digits for the day and month, and two or four digits for the year.

    example

    isDateString('11/11/2011'); // true isDateString('1/5'); // false isDateString(true); // false

    Parameters

    • val: string

      The value to check.

    Returns boolean

    Whether the value is a date string.

Legend

  • Function

Generated using TypeDoc