Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The epochNanoseconds
accessor property of Temporal.Instant
instances returns a BigInt
representing the number of nanoseconds elapsed since the Unix epoch (midnight at the beginning of January 1, 1970, UTC) to this instant.
The set accessor of epochNanoseconds
is undefined
. You cannot change this property directly. To create a new Temporal.Instant
object with the desired new epochNanoseconds
value, use the add()
or subtract()
method with the appropriate duration.
An instant can only represent ±108 days (about ±273,972.6 years) around the epoch, which is ±8.64e21 nanoseconds. Attempting to set epochNanosecond
beyond this boundary throws a RangeError
.