mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibJS: Use nsMinInstant / nsMaxInstant constants in ParseTemporalInstant
This is an editorial change in the Temporal spec.
See: a045682
This commit is contained in:
parent
690585323d
commit
287dd03e2e
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ ThrowCompletionOr<BigInt*> parse_temporal_instant(GlobalObject& global_object, S
|
|||
// 5. Let utc be GetEpochFromISOParts(result.[[Year]], result.[[Month]], result.[[Day]], result.[[Hour]], result.[[Minute]], result.[[Second]], result.[[Millisecond]], result.[[Microsecond]], result.[[Nanosecond]]).
|
||||
auto* utc = get_epoch_from_iso_parts(global_object, result.year, result.month, result.day, result.hour, result.minute, result.second, result.millisecond, result.microsecond, result.nanosecond);
|
||||
|
||||
// 6. If ℝ(utc) < -8.64 × 10^21 or ℝ(utc) > 8.64 × 10^21, then
|
||||
// 6. If ℝ(utc) < nsMinInstant or ℝ(utc) > nsMaxInstant, then
|
||||
if (utc->big_integer() < ns_min_instant || utc->big_integer() > ns_max_instant) {
|
||||
// a. Throw a RangeError exception.
|
||||
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidEpochNanoseconds);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue