mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibJS: Use CreateTemporalCalendar in GetBuiltinCalendar
This is an editorial change in the Temporal spec.
See: f6b3a10
This commit is contained in:
parent
7f5b4842f2
commit
251f5e8885
1 changed files with 2 additions and 2 deletions
|
@ -69,8 +69,8 @@ ThrowCompletionOr<Calendar*> get_builtin_calendar(GlobalObject& global_object, S
|
|||
if (!is_builtin_calendar(identifier))
|
||||
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidCalendarIdentifier, identifier);
|
||||
|
||||
// 2. Return ? Construct(%Temporal.Calendar%, « id »).
|
||||
return static_cast<Calendar*>(TRY(construct(global_object, *global_object.temporal_calendar_constructor(), js_string(vm, identifier))));
|
||||
// 2. Return ! CreateTemporalCalendar(id).
|
||||
return MUST(create_temporal_calendar(global_object, identifier));
|
||||
}
|
||||
|
||||
// 12.1.4 GetISO8601Calendar ( ), https://tc39.es/proposal-temporal/#sec-temporal-getiso8601calendar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue