WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 79bb94a

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3981e66 commit 79bb94a

File tree

30 files changed

+0
-60
lines changed

30 files changed

+0
-60
lines changed

files/en-us/web/javascript/reference/global_objects/temporal/duration/valueof/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Duration.valueOf
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`valueOf()`** method of {{jsxref("Temporal.Duration")}} instances throws a {{jsxref("TypeError")}}, which prevents `Temporal.Duration` instances from being [implicitly converted to primitives](/en-US/docs/Web/JavaScript/Guide/Data_structures#primitive_coercion) when used in arithmetic or comparison operations.
1311

1412
## Syntax

files/en-us/web/javascript/reference/global_objects/temporal/duration/weeks/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Duration.weeks
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`weeks`** accessor property of {{jsxref("Temporal.Duration")}} instances returns an integer representing the number of weeks in the duration.
1311

1412
Unless the duration is [balanced](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration#duration_balancing), you cannot assume the range of this value, but you can know its sign by checking the duration's [`sign`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/sign) property. If it is balanced to a unit above weeks, the `weeks` absolute value's range depends on the calendar (how many weeks are in a month or year).

files/en-us/web/javascript/reference/global_objects/temporal/duration/with/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Duration.with
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`with()`** method of {{jsxref("Temporal.Duration")}} instances returns a new `Temporal.Duration` object representing this duration with some fields replaced by new values. Because all `Temporal` objects are designed to be immutable, this method essentially functions as the setter for the duration's fields.
1311

1412
## Syntax

files/en-us/web/javascript/reference/global_objects/temporal/duration/years/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Duration.years
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`years`** accessor property of {{jsxref("Temporal.Duration")}} instances returns an integer representing the number of years in the duration.
1311

1412
You can know the sign of `years` by checking the duration's [`sign`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/sign) property.

files/en-us/web/javascript/reference/global_objects/temporal/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ browser-compat: javascript.builtins.Temporal
66
sidebar: jsref
77
---
88

9-
10-
119
The **`Temporal`** object enables date and time management in various scenarios, including built-in time zone and calendar representation, wall-clock time conversions, arithmetics, formatting, and more. It is designed as a full replacement for the {{jsxref("Date")}} object.
1210

1311
## Description

files/en-us/web/javascript/reference/global_objects/temporal/instant/add/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Instant.add
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`add()`** method of {{jsxref("Temporal.Instant")}} instances returns a new `Temporal.Instant` object representing this instant moved forward by a given duration (in a form convertible by {{jsxref("Temporal/Duration/from", "Temporal.Duration.from()")}}).
1311

1412
## Syntax

files/en-us/web/javascript/reference/global_objects/temporal/instant/compare/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Instant.compare
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`Temporal.Instant.compare()`** static method returns a number (-1, 0, or 1) indicating whether the first instant comes before, is the same as, or comes after the second instant. It is equivalent to comparing the {{jsxref("Temporal/Instant/epochNanoseconds", "epochNanoseconds")}} of the two instants.
1311

1412
## Syntax

files/en-us/web/javascript/reference/global_objects/temporal/instant/epochmilliseconds/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Instant.epochMilliseconds
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`epochMilliseconds`** accessor property of {{jsxref("Temporal.Instant")}} instances returns an integer representing the number of milliseconds elapsed since the Unix epoch (midnight at the beginning of January 1, 1970, UTC) to this instant. It is equivalent to dividing `epochNanoseconds` by `1e6` and flooring the result.
1311

1412
The set accessor of `epochMilliseconds` is `undefined`. You cannot change this property directly. To create a new `Temporal.Instant` object with the desired new `epochMilliseconds` value, use the {{jsxref("Temporal/Instant/fromEpochMilliseconds", "Temporal.Instant.fromEpochMilliseconds()")}} static method instead.

files/en-us/web/javascript/reference/global_objects/temporal/instant/epochnanoseconds/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Instant.epochNanoseconds
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`epochNanoseconds`** accessor property of {{jsxref("Temporal.Instant")}} instances returns a {{jsxref("BigInt")}} representing the number of nanoseconds elapsed since the Unix epoch (midnight at the beginning of January 1, 1970, UTC) to this instant.
1311

1412
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 {{jsxref("Temporal/Instant/fromEpochNanoseconds", "Temporal.Instant.fromEpochNanoseconds()")}} static method instead.

files/en-us/web/javascript/reference/global_objects/temporal/instant/equals/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ browser-compat: javascript.builtins.Temporal.Instant.equals
77
sidebar: jsref
88
---
99

10-
11-
1210
The **`equals()`** method of {{jsxref("Temporal.Instant")}} instances returns `true` if this instant is equivalent in value to another instant (in a form convertible by {{jsxref("Temporal/Instant/from", "Temporal.Instant.from()")}}), and `false` otherwise. They are compared by their {{jsxref("Temporal/Instant/epochNanoseconds", "epochNanoseconds")}}. It is equivalent to `Temporal.Instant.compare(this, other) === 0`.
1311

1412
## Syntax

0 commit comments

Comments
 (0)