LibJS: Explicitly state integer limits for UTC offset minutes and ns

This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/1fdf09a

Note that the integer limits in the above commit are in spec headers,
which we don't copy to our implementation.
This commit is contained in:
Timothy Flynn
2025-11-12 15:14:43 -05:00
committed by Tim Flynn
parent 462e7b0c87
commit bf3481b301
Notes: github-actions[bot] 2025-11-12 21:21:17 +00:00
2 changed files with 2 additions and 8 deletions

View File

@@ -452,10 +452,7 @@ ParsedTimeZoneIdentifier parse_time_zone_identifier(ParseResult const& parse_res
// d. Let offsetMinutes be offsetNanoseconds / (60 × 10**9).
auto offset_minutes = offset_nanoseconds / 60'000'000'000;
// e. Assert: offsetMinutes is an integer.
VERIFY(trunc(offset_minutes) == offset_minutes);
// f. Return Time Zone Identifier Parse Record { [[Name]]: EMPTY, [[OffsetMinutes]]: offsetMinutes }.
// e. Return Time Zone Identifier Parse Record { [[Name]]: EMPTY, [[OffsetMinutes]]: offsetMinutes }.
return ParsedTimeZoneIdentifier { .name = {}, .offset_minutes = static_cast<i64>(offset_minutes) };
}
}