HED JavaScript Library
    Preparing search index...

    Function isExistingGregorianDate

    • Determine whether a YYYY-MM-DD string names a date that exists in the Gregorian calendar.

      Only the calendar is checked: the string must already have the YYYY-MM-DD shape. Century years are leap years only when divisible by 400, so 2000-02-29 exists and 1900-02-29 does not.

      Parameters

      • dateString: string

        A date in YYYY-MM-DD form.

      Returns boolean

      Whether the date exists.