1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:47:35 +00:00

LibJS: Fix "set it to" language to be more explicit

This is an editorial change in the Temporal spec.

See: de58241
This commit is contained in:
Linus Groh 2022-03-10 17:04:46 +01:00
parent 4722045e28
commit 17da627b4c
9 changed files with 16 additions and 16 deletions

View file

@ -273,7 +273,7 @@ ThrowCompletionOr<ZonedDateTime*> create_temporal_zoned_date_time(GlobalObject&
// 2. Assert: ! IsValidEpochNanoseconds(epochNanoseconds) is true.
VERIFY(is_valid_epoch_nanoseconds(epoch_nanoseconds));
// 5. If newTarget is not present, set it to %Temporal.ZonedDateTime%.
// 5. If newTarget is not present, set newTarget to %Temporal.ZonedDateTime%.
if (!new_target)
new_target = global_object.temporal_zoned_date_time_constructor();
@ -292,15 +292,15 @@ ThrowCompletionOr<String> temporal_zoned_date_time_to_string(GlobalObject& globa
{
// 1. Assert: Type(zonedDateTime) is Object and zonedDateTime has an [[InitializedTemporalZonedDateTime]] internal slot.
// 2. If increment is not present, set it to 1.
// 2. If increment is not present, set increment to 1.
if (!increment.has_value())
increment = 1;
// 3. If unit is not present, set it to "nanosecond".
// 3. If unit is not present, set unit to "nanosecond".
if (!unit.has_value())
unit = "nanosecond"sv;
// 4. If roundingMode is not present, set it to "trunc".
// 4. If roundingMode is not present, set roundingMode to "trunc".
if (!rounding_mode.has_value())
rounding_mode = "trunc"sv;