bhylu.com

Advertisements

JS Dates

Date represents a point in time using milliseconds from the Unix epoch. Format it explicitly when a stable time zone matters.

Where to run this

This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.

A practical example

JavaScript

const opening = new Date("2026-11-07T10:00:00Z");
console.log(opening.toISOString());

What happens

The output is the same UTC instant in ISO format.