mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
LibJS: Use CreateTemporalCalendar in GetBuiltinCalendar
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/f6b3a10
This commit is contained in:
parent
7f5b4842f2
commit
251f5e8885
Notes:
sideshowbarker
2024-07-17 17:35:25 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/251f5e8885 Pull-request: https://github.com/SerenityOS/serenity/pull/12990 Reviewed-by: https://github.com/IdanHo ✅ Reviewed-by: https://github.com/Lubrsi
@ -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…
Reference in New Issue
Block a user