ThemeParks.wiki Parks API - v2.0.0
    Preparing search index...

    Function formatDate

    • Format a Date as a YYYY-MM-DD string. Replaces the verbose getFullYear() + '-' + padStart(getMonth()+1) + ... pattern that was duplicated across 30+ call sites.

      Parameters

      • date: Date

        Date object (interpreted in UTC unless inTimezone is provided)

      • OptionalinTimezone: string

        Optional IANA timezone — formats the date as seen in that timezone

      Returns string