mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibJS: Update parse_temporal_time_zone_string() substring bounds
This is a normative change in the Temporal spec.
See: 73b9fe3
This commit is contained in:
parent
91de60d912
commit
5da8ae0020
1 changed files with 2 additions and 2 deletions
|
@ -1005,9 +1005,9 @@ ThrowCompletionOr<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject
|
|||
if (fraction_part.has_value()) {
|
||||
// i. Set fraction to the string-concatenation of the previous value of fraction and the string "000000000".
|
||||
auto fraction = String::formatted("{}000000000", *fraction_part);
|
||||
// ii. Let nanoseconds be the String value equal to the substring of fraction from 0 to 9.
|
||||
// ii. Let nanoseconds be the String value equal to the substring of fraction from 1 to 10.
|
||||
// iii. Set nanoseconds to ! ToIntegerOrInfinity(nanoseconds).
|
||||
nanoseconds = MUST(Value(js_string(vm, fraction.substring(0, 9))).to_integer_or_infinity(global_object));
|
||||
nanoseconds = MUST(Value(js_string(vm, fraction.substring(1, 10))).to_integer_or_infinity(global_object));
|
||||
}
|
||||
// h. Else,
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue