const isDateValid = (val: string) => !Number.isNaN(new Date(val).valueOf());
      
      Typescript language logo

      Is a valid date

      Codiga's TypeScript Recipes

      Checks if a valid date object can be created from the given values.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.