mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 21:12:08 +02:00
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:
Notes:
github-actions[bot]
2025-11-12 21:21:17 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/bf3481b3015 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6802
@@ -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) };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user