Skip to content

Discrepancy in the note for TimeClip #1971

@uid11

Description

@uid11

There may be a discrepancy in the note for the abstract operation TimeClip (https://tc39.es/ecma262/#sec-timeclip).
The note mentions step 4, but the TimeClip algorithm at that moment contains only three steps.

      <emu-clause id="sec-timeclip" aoid="TimeClip">
        <h1>TimeClip ( _time_ )</h1>
        <p>The abstract operation TimeClip takes argument _time_ (a Number). It calculates a number of milliseconds. It performs the following steps when called:</p>
        <emu-alg>
          1. If _time_ is not finite, return *NaN*.
          1. If abs(_time_) &gt; 8.64 &times; 10<sup>15</sup>, return *NaN*.
          1. Return ! ToInteger(_time_).
        </emu-alg>
        <emu-note>
          <p>The point of step 4 is that an implementation is permitted a choice of internal representations of time values, for example as a 64-bit signed integer or as a 64-bit floating-point value. Depending on the implementation, this internal representation may or may not distinguish *-0* and *+0*.</p>
        </emu-note>
      </emu-clause>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions