bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/JavaScript/Objects, Classes, and Advanced Patterns
JavaScript•Objects, Classes, and Advanced Patterns

JavaScript Temporal Instant

Concept visual

JavaScript Temporal Instant

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

The Temporal.Instant Object

The

Temporal.Instant object represents an exact moment in UTC time.

It has

NO time zone and NO calendar. It stores nanoseconds since January 1, 1970 00:00:00 (Unix epoch).

Example:

Formula

2026 - 05 - 17T14:30:00Z

Example

May 17, 2026 at 14:30 at the zero meridian Greenwich, London:

const instant = Temporal.Instant.from("2026-05-17T14:30:00Z");

The Z

at the end of the date stands for Zero time.

What is Instant Time?

It is a precise point in time

It is an exact moment on the global timeline

It is not affected by time zones

It is not affected DST (Daylight Saving Time)

It is measured in UTC

Z at the End of the Date?

The Z

at the end is a part of the ISO 8601 standard for formatting date and time. It indicates that the time is 0 (Zero) offset from UTC time.

It is also known as

Z time,

Zero time or

Zulu time.

What is UTC Time?

UTC stands for

Universal Time Coordinated. It is the exact time on the zero meridian (Greenwich, London) It is the same moment everywhere on earth It is not affected by any time zones It is not affected DST (Daylight Saving Time) Prior to 1972, UTC was called Greenwich Mean Time (GMT). Is now referred to as Coordinated Universal Time or Universal Time Coordinated (UTC). To obtain local time in world, you need to add or subtract hours from UTC depending on how many time zones you are away from Greenwich.

Example

London: 12:00 (UTC)

Formula

Oslo: 14:00 (UTC + 2)
New York: 08:00 (UTC - 4)
Tokyo: 21:00 (UTC + 9)

How to Create a Temporal.Instant An Instant can be created in several different ways:

From

Code

With Constructor new Temporal.Instant()

From String

Temporal.Instant.from()

From Epoch millisec

Temporal.Instant.fromEpochMilliseconds()

From Epoch nanosec

Temporal.Instant.fromEpochNanoseconds()

From Current Time

Temporal.Now.instant()

Create an Instant from new

You can create an Instant using the new Temporal.Instant() constructor.

Previous

JavaScript this Keyword

Next

JavaScript Function call()