Skip to content

Commit 0cb16e1

Browse files
committed
Move DurationSign from ECMA-402 and use real Duration objects
DurationSign no longer needs to be defined by Temporal, as it's now part of ECMA-402. However, when Temporal becomes part of ECMA-262, we do need to move DurationSign into ECMA-262. Put it in a <del> block in intl.html. We can keep the new definition in its current place in the spec while adjusting its ID. Once Temporal.Duration objects are introduced, there is no longer any need for Duration Records. So, make the ECMA-402 DurationSign accept a Temporal.Duration object (as it already did in Temporal), delete the ToDurationRecord operation and the Duration Record definition, and change several other operations from ECMA-402 to use Temporal.Duration objects instead of Duration Records. Temporarily, since these operations aren't yet in ecma402-biblio pending tc39/ecma402#943, add a JSON bibliography file so the references aren't dangling.
1 parent 08bc1f1 commit 0cb16e1

File tree

4 files changed

+378
-3
lines changed

4 files changed

+378
-3
lines changed

spec.html

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
contributors: Maggie Pint, Matt Johnson, Brian Terlson, Daniel Ehrenberg, Philipp Dunkel, Sasha Pierson, Ujjwal Sharma, Philip Chimento, Justin Grant
77
markEffects: true
88
</pre>
9+
<emu-biblio href="spec/biblio.json"></emu-biblio>
910

1011
<emu-intro id="sec-temporal-intro">
1112
<h1>Introduction</h1>

spec/biblio.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[
2+
{
3+
"location": "https://tc39.es/ecma402/",
4+
"entries": [
5+
{
6+
"type": "op",
7+
"aoid": "FormatNumericHours",
8+
"id": "sec-formatnumerichours"
9+
},
10+
{
11+
"type": "op",
12+
"aoid": "FormatNumericMinutes",
13+
"id": "sec-formatnumericminutes"
14+
},
15+
{
16+
"type": "op",
17+
"aoid": "FormatNumericSeconds",
18+
"id": "sec-formatnumericseconds"
19+
},
20+
{
21+
"type": "op",
22+
"aoid": "NextUnitFractional",
23+
"id": "sec-nextunitfractional"
24+
},
25+
{
26+
"type": "op",
27+
"aoid": "ListFormatParts",
28+
"id": "sec-listformatparts"
29+
},
30+
{
31+
"type": "clause",
32+
"number": "Table 21",
33+
"id": "table-partition-duration-format-pattern"
34+
}
35+
]
36+
}
37+
]

spec/duration.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1096,10 +1096,10 @@ <h1>
10961096
</emu-alg>
10971097
</emu-clause>
10981098

1099-
<emu-clause id="sec-temporal-durationsign" type="abstract operation">
1099+
<emu-clause id="sec-durationsign" type="abstract operation">
11001100
<h1>
11011101
DurationSign (
1102-
_duration_: a Temporal.Duration,
1102+
_duration_: a <del>Duration Record</del><ins>Temporal.Duration</ins>,
11031103
): -1, 0, or 1
11041104
</h1>
11051105
<dl class="header">

0 commit comments

Comments
 (0)