1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

LibJS: Rename variables to 'calendarLike' in a couple of places

This is an editorial change in the Temporal spec.

See: 9af2d35
This commit is contained in:
Linus Groh 2022-02-04 19:29:15 +00:00
parent c48f695b90
commit e087cd574e
6 changed files with 36 additions and 32 deletions

View file

@ -80,17 +80,17 @@ ThrowCompletionOr<PlainMonthDay*> to_temporal_month_day(GlobalObject& global_obj
calendar = &static_cast<ZonedDateTime&>(item_object).calendar();
calendar_absent = false;
} else {
// i. Let calendar be ? Get(item, "calendar").
auto calendar_value = TRY(item_object.get(vm.names.calendar));
// i. Let calendarLike be ? Get(item, "calendar").
auto calendar_like = TRY(item_object.get(vm.names.calendar));
// ii. If calendar is undefined, then
// ii. If calendarLike is undefined, then
// 1. Let calendarAbsent be true.
// iii. Else,
// 1. Let calendarAbsent be false.
calendar_absent = calendar_value.is_undefined();
calendar_absent = calendar_like.is_undefined();
// iv. Set calendar to ? ToTemporalCalendarWithISODefault(calendar).
calendar = TRY(to_temporal_calendar_with_iso_default(global_object, calendar_value));
// iv. Let calendar be ? ToTemporalCalendarWithISODefault(calendarLike).
calendar = TRY(to_temporal_calendar_with_iso_default(global_object, calendar_like));
}
// d. Let fieldNames be ? CalendarFields(calendar, « "day", "month", "monthCode", "year" »).