Dev HelpersOpen library
← Back

Format a named timezone

Format a named timezone. A self-contained example using the JavaScript runtime.

Open this example in the interactive library

Source code

console.log(
  new Intl.DateTimeFormat("en-CA", {
    dateStyle: "medium",
    timeStyle: "short",
    timeZone: "America/Toronto",
  }).format(new Date("2026-10-22T15:00:00Z")),
);

Sample output

Oct 22, 2026, 11:00 a.m.