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

    Function formatUTC

    • Format a Date in UTC using a moment-style format string.

      Supported tokens (each token is replaced once, in this order):

      • YYYY — 4-digit year
      • MMM — short month name (Jan, Feb, ...)
      • MM — 2-digit month (01-12)
      • DD — 2-digit day (01-31)
      • ddd — short day name (Sun, Mon, ...)
      • HH — 2-digit hour, 24-hour clock (00-23)
      • mm — 2-digit minute (00-59)
      • ss — 2-digit second (00-59)

      Any other tokens (e.g., YY, M, h, a) are NOT supported and will appear unchanged in the output.

      Parameters

      • date: Date
      • formatStr: string

      Returns string

      formatUTC(new Date('2024-03-15T14:30:00Z'), 'YYYY-MM-DD HH:mm:ss')
      // => '2024-03-15 14:30:00'