@@ -239,7 +239,7 @@ <h1>Temporal.PlainTime.prototype.with ( _temporalTimeLike_ [ , _options_ ] )</h1
239
239
1. If Type(_temporalTimeLike_ ) is not Object, then
240
240
1. Throw a *TypeError* exception.
241
241
1. Perform ? RejectObjectWithCalendarOrTimeZone(_temporalTimeLike_ ).
242
- 1. Let _partialTime_ be ? ToPartialTime (_temporalTimeLike_ ).
242
+ 1. Let _partialTime_ be ? ToTemporalTimeRecord (_temporalTimeLike_ , ~partial~ ).
243
243
1. Set _options_ to ? GetOptionsObject(_options_ ).
244
244
1. Let _overflow_ be ? ToTemporalOverflow(_options_ ).
245
245
1. If _partialTime_ .[[Hour]] is not *undefined* , then
@@ -621,75 +621,6 @@ <h1>ToTemporalTime ( _item_ [ , _overflow_ ] )</h1>
621
621
</emu-alg >
622
622
</emu-clause >
623
623
624
- <emu-clause id =" sec-temporal-topartialtime" aoid =" ToPartialTime" >
625
- <h1 >ToPartialTime ( _temporalTimeLike_ )</h1 >
626
- <emu-alg >
627
- 1. Assert: Type(_temporalTimeLike_ ) is Object.
628
- 1. Let _result_ be the Record {
629
- [[Hour]]: *undefined* ,
630
- [[Minute]]: *undefined* ,
631
- [[Second]]: *undefined* ,
632
- [[Millisecond]]: *undefined* ,
633
- [[Microsecond]]: *undefined* ,
634
- [[Nanosecond]]: *undefined*
635
- }.
636
- 1. Let _any_ be *false* .
637
- 1. For each row of <emu-xref href =" #table-temporal-temporaltimelike-properties" ></emu-xref >, except the header row, in table order, do
638
- 1. Let _property_ be the Property value of the current row.
639
- 1. Let _value_ be ? Get(_temporalTimeLike_ , _property_ ).
640
- 1. If _value_ is not *undefined* , then
641
- 1. Set _any_ to *true* .
642
- 1. Set _value_ to ? ToIntegerThrowOnInfinity(_value_ ).
643
- 1. Set _result_ 's internal slot whose name is the Internal Slot value of the current row to _value_ .
644
- 1. If _any_ is *false* , then
645
- 1. Throw a *TypeError* exception.
646
- 1. Return _result_ .
647
- </emu-alg >
648
-
649
- <emu-table id =" table-temporal-temporaltimelike-properties" >
650
- <emu-caption >Properties of a TemporalTimeLike</emu-caption >
651
- <table class =" real-table" >
652
- <thead >
653
- <tr >
654
- <th >Internal Slot</th >
655
- <th >Property</th >
656
- </tr >
657
- </thead >
658
- <tbody >
659
- <tr >
660
- <td >[[Hour]]</td >
661
- <td >*"hour"* </td >
662
- </tr >
663
-
664
- <tr >
665
- <td >[[Microsecond]]</td >
666
- <td >*"microsecond"* </td >
667
- </tr >
668
-
669
- <tr >
670
- <td >[[Millisecond]]</td >
671
- <td >*"millisecond"* </td >
672
- </tr >
673
-
674
- <tr >
675
- <td >[[Minute]]</td >
676
- <td >*"minute"* </td >
677
- </tr >
678
-
679
- <tr >
680
- <td >[[Nanosecond]]</td >
681
- <td >*"nanosecond"* </td >
682
- </tr >
683
-
684
- <tr >
685
- <td >[[Second]]</td >
686
- <td >*"second"* </td >
687
- </tr >
688
- </tbody >
689
- </table >
690
- </emu-table >
691
- </emu-clause >
692
-
693
624
<emu-clause id =" sec-temporal-regulatetime" aoid =" RegulateTime" >
694
625
<h1 >RegulateTime ( _hour_ , _minute_ , _second_ , _millisecond_ , _microsecond_ , _nanosecond_ , _overflow_ )</h1 >
695
626
<emu-alg >
@@ -812,11 +743,17 @@ <h1>CreateTemporalTime ( _hour_, _minute_, _second_, _millisecond_, _microsecond
812
743
</emu-alg >
813
744
</emu-clause >
814
745
815
- <emu-clause id =" sec-temporal-totemporaltimerecord" aoid =" ToTemporalTimeRecord" >
816
- <h1 >ToTemporalTimeRecord ( _temporalTimeLike_ )</h1 >
817
- <emu-note >The value of ! ToIntegerThrowOnInfinity(*undefined* ) is 0.</emu-note >
746
+ <emu-clause id =" sec-temporal-totemporaltimerecord" type =" abstract operation" >
747
+ <h1 >
748
+ ToTemporalTimeRecord (
749
+ _temporalTimeLike_ : an Object,
750
+ optional _completeness_ : ~partial~ or ~complete~ ,
751
+ ): either a normal completion containing an Object, or an abrupt completion
752
+ </h1 >
753
+ <dl class =" header" >
754
+ </dl >
818
755
<emu-alg >
819
- 1. Assert: Type( _temporalTimeLike_ ) is Object .
756
+ 1. If _completeness_ is not present, set _completeness_ to ~complete~ .
820
757
1. Let _result_ be the Record {
821
758
[[Hour]]: *undefined* ,
822
759
[[Minute]]: *undefined* ,
@@ -829,14 +766,57 @@ <h1>ToTemporalTimeRecord ( _temporalTimeLike_ )</h1>
829
766
1. For each row of <emu-xref href =" #table-temporal-temporaltimelike-properties" ></emu-xref >, except the header row, in table order, do
830
767
1. Let _property_ be the Property value of the current row.
831
768
1. Let _value_ be ? Get(_temporalTimeLike_ , _property_ ).
832
- 1. If _value_ is not *undefined* , then
833
- 1. Set _any_ to *true* .
834
- 1. Set _value_ to ? ToIntegerThrowOnInfinity(_value_ ).
835
- 1. Set _result_ 's internal slot whose name is the Internal Slot value of the current row to _value_ .
769
+ 1. If _value_ is not *undefined* , set _any_ to *true* .
770
+ 1. If _value_ is not *undefined* or _completeness_ is ~complete~ , then
771
+ 1. Set _value_ to ? ToIntegerThrowOnInfinity(_value_ ).
772
+ 1. Set _result_ 's internal slot whose name is the Internal Slot value of the current row to _value_ .
836
773
1. If _any_ is *false* , then
837
774
1. Throw a *TypeError* exception.
838
775
1. Return _result_ .
839
776
</emu-alg >
777
+
778
+ <emu-table id =" table-temporal-temporaltimelike-properties" >
779
+ <emu-caption >Properties of a TemporalTimeLike</emu-caption >
780
+ <table class =" real-table" >
781
+ <thead >
782
+ <tr >
783
+ <th >Internal Slot</th >
784
+ <th >Property</th >
785
+ </tr >
786
+ </thead >
787
+ <tbody >
788
+ <tr >
789
+ <td >[[Hour]]</td >
790
+ <td >*"hour"* </td >
791
+ </tr >
792
+
793
+ <tr >
794
+ <td >[[Microsecond]]</td >
795
+ <td >*"microsecond"* </td >
796
+ </tr >
797
+
798
+ <tr >
799
+ <td >[[Millisecond]]</td >
800
+ <td >*"millisecond"* </td >
801
+ </tr >
802
+
803
+ <tr >
804
+ <td >[[Minute]]</td >
805
+ <td >*"minute"* </td >
806
+ </tr >
807
+
808
+ <tr >
809
+ <td >[[Nanosecond]]</td >
810
+ <td >*"nanosecond"* </td >
811
+ </tr >
812
+
813
+ <tr >
814
+ <td >[[Second]]</td >
815
+ <td >*"second"* </td >
816
+ </tr >
817
+ </tbody >
818
+ </table >
819
+ </emu-table >
840
820
</emu-clause >
841
821
842
822
<emu-clause id =" sec-temporal-temporaltimetostring" aoid =" TemporalTimeToString" >
0 commit comments