Is a valid date



    Giovanny Gongora

    Codiga's TypeScript Recipes

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

    const isDateValid = (val: string) => !Number.isNaN(new Date(val).valueOf());
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.