Skip to content

Commit

Permalink
fixup: remove prematurely added Temporal limits (#202)
Browse files Browse the repository at this point in the history
* fixup! Editorial: Removed prematurely added Temporal limits
  • Loading branch information
ben-allen committed May 23, 2024
1 parent eb5f6e6 commit 4359f3f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,6 @@ contributors: Ujjwal Sharma, Younies Mahmoud
1. If 𝔽(_v_) is not finite, return *false*.
1. If _v_ < 0 and _sign_ > 0, return *false*.
1. If _v_ > 0 and _sign_ < 0, return *false*.
1. If abs(_years_) &ge; 2<sup>32</sup>, return *false*.
1. If abs(_months_) &ge; 2<sup>32</sup>, return *false*.
1. If abs(_weeks_) &ge; 2<sup>32</sup>, return *false*.
1. Let _normalizedSeconds_ be _days_ &times; 86,400 + _hours_ &times; 3600 + _minutes_ &times; 60 + _seconds_ + ℝ(𝔽(_milliseconds_)) &times; 10<sup>-3</sup> + ℝ(𝔽(_microseconds_)) &times; 10<sup>-6</sup> + ℝ(𝔽(_nanoseconds_)) &times; 10<sup>-9</sup>.
1. NOTE: The above step cannot be implemented directly using floating-point arithmetic. Multiplying by 10<sup>-3</sup>, 10<sup>-6</sup>, and 10<sup>-9</sup> respectively may be imprecise when _milliseconds_, _microseconds_, or _nanoseconds_ is an unsafe integer. This multiplication can be implemented in C++ with an implementation of `std::remquo()` with sufficient bits in the quotient. String manipulation will also give an exact result, since the multiplication is by a power of 10.
1. If abs(_normalizedSeconds_) &ge; 2<sup>53</sup>, return *false*.
1. Return *true*.
</emu-alg>
<emu-note>The abstract operations ToIntegerIfIntegral, ToDurationRecord, DurationSign, and IsValidDuration take the same parameters as the abstract operations of the same name in the Temporal proposal's specification, and will be removed in favor of those abstract operations if the Temporal proposal becomes part of ECMA-402 before this proposal does.</emu-note>
Expand Down

0 comments on commit 4359f3f

Please sign in to comment.