diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochmilliseconds/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochmilliseconds/index.md index 4020fea6a7dd6d0..6e626e758f08707 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochmilliseconds/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochmilliseconds/index.md @@ -38,6 +38,10 @@ A new `Temporal.Instant` object representing the instant in time specified by `e ```js const instant = Temporal.Instant.fromEpochMilliseconds(0); console.log(instant.toString()); // 1970-01-01T00:00:00Z +const vostok1Liftoff = Temporal.Instant.fromEpochMilliseconds(-275248380000); +console.log(vostok1Liftoff.toString()); // 1961-04-12T06:07:00Z +const sts1Liftoff = Temporal.Instant.fromEpochMilliseconds(355924804000); +console.log(sts1Liftoff.toString()); // 1981-04-12T12:00:04Z ``` ## Specifications diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochnanoseconds/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochnanoseconds/index.md index e07f6b740218a9f..d1e0a62cd4b4389 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochnanoseconds/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/instant/fromepochnanoseconds/index.md @@ -38,6 +38,11 @@ A new `Temporal.Instant` object representing the instant in time specified by `e ```js const instant = Temporal.Instant.fromEpochNanoseconds(0n); console.log(instant.toString()); // 1970-01-01T00:00:00Z +const vostok1Liftoff = + Temporal.Instant.fromEpochNanoseconds(-275248380000000000n); +console.log(vostok1Liftoff.toString()); // 1961-04-12T06:07:00Z +const sts1Liftoff = Temporal.Instant.fromEpochNanoseconds(355924804000000000n); +console.log(sts1Liftoff.toString()); // 1981-04-12T12:00:04Z ``` ## Specifications diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/instant/instant/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/instant/instant/index.md index 090372e5cbad9ee..321c0589c38996d 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/instant/instant/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/instant/instant/index.md @@ -40,6 +40,10 @@ A new `Temporal.Instant` object representing the instant in time specified by `e ```js const instant = new Temporal.Instant(0n); console.log(instant.toString()); // 1970-01-01T00:00:00Z +const vostok1Liftoff = new Temporal.Instant(-275248380000000000n); +console.log(vostok1Liftoff.toString()); // 1961-04-12T06:07:00Z +const sts1Liftoff = new Temporal.Instant(355924804000000000n); +console.log(sts1Liftoff.toString()); // 1981-04-12T12:00:04Z ``` ## Specifications diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/minute/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/minute/index.md index 1819c47ce788821..5a2cc8f9b917a3a 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/minute/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/minute/index.md @@ -33,7 +33,7 @@ Typically, `minute` always goes from 0 to 59 and then back to 0, even when passi ```js const dt = Temporal.ZonedDateTime.from( "2021-10-03T01:59:00+10:30[Australia/Lord_Howe]", -).add({ minutes: 1 }); +); console.log(dt.minute); // 59 const dt2 = dt.add({ minutes: 1 }); console.log(dt2.minute); // 30 diff --git a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/timezoneid/index.md b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/timezoneid/index.md index f89b1b453dd6724..3d7ac2b1e566558 100644 --- a/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/timezoneid/index.md +++ b/files/en-us/web/javascript/reference/global_objects/temporal/zoneddatetime/timezoneid/index.md @@ -7,7 +7,7 @@ browser-compat: javascript.builtins.Temporal.ZonedDateTime.timeZoneId {{JSRef}} -The **`timeZoneId`** accessor property of {{jsxref("Temporal.ZonedDateTime")}} instances returns a string representing the [time zone identifier](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime#time_zones_and_offsets) used to interpret the internal instant. The string is either a named identifier in the preferred case (such as `"America/New_York"`), or an offset in the form `"±hh:mm"`. Aliases are not canonicalized to the primary identifier. +The **`timeZoneId`** accessor property of {{jsxref("Temporal.ZonedDateTime")}} instances returns a string representing the [time zone identifier](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime#time_zones_and_offsets) used to interpret the internal instant. The string is either a named identifier in the preferred case (such as `"America/New_York"`), or an offset in the form `"±hh:mm"`. If the time zone has aliases, the `timeZoneId` is the identifier used to create the `ZonedDateTime`, without canonicalization to the primary identifier. The set accessor of `timeZoneId` is `undefined`. You cannot change this property directly. Use the {{jsxref("Temporal/ZonedDateTime/withTimeZone", "withTimeZone()")}} method to create a new `Temporal.ZonedDateTime` object with the desired new value. @@ -31,7 +31,7 @@ const dt3 = dt2.withTimeZone("Asia/Shanghai"); console.log(dt3.timeZoneId); // "Asia/Shanghai" ``` -Unlike the `timeZone` returned by {{jsxref("Intl/DatetimeFormat/resolvedOptions", "Intl.DateTimeFormat.prototype.resolvedOptions()")}}, the `timeZoneId` is never canonicalized to the primary identifier. +The `timeZoneId` is never canonicalized to the primary identifier; it is the same as the one used to create the `ZonedDateTime`. ```js const dt = Temporal.ZonedDateTime.from(