ChronosChronos

formatUTC

Format a date in UTC timezone using format tokens

formatUTC()

Notes

  • formatUTC() is just a wrapper around the format() method with the useUTC option set to true. It is provided for convenience.
  • Format tokens are same as format method.

Signature

formatUTC(format?: string): string

Parameters

  • format: Format string (default: 'dd, mmm DD, YYYY HH:mm:ss:mss')

Return Type

string - Formatted UTC date

Notes

  • Always uses UTC time regardless of instance configuration

Example

playground.ts

Last updated: Thu, May 21, 2026 04:59:08PM (UTC)

On this page