LibJS: Mark CreateTemporalTimeZone("UTC") as infallible

This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/ea25cfa
This commit is contained in:
Linus Groh 2022-01-13 19:25:36 +01:00
parent 2255e8859c
commit 64f125fe34

View file

@ -240,9 +240,8 @@ ThrowCompletionOr<String> temporal_instant_to_string(GlobalObject& global_object
// 4. If outputTimeZone is undefined, then
if (output_time_zone.is_undefined()) {
// TODO: Can this really throw...?
// a. Set outputTimeZone to ? CreateTemporalTimeZone("UTC").
output_time_zone = TRY(create_temporal_time_zone(global_object, "UTC"sv));
// a. Set outputTimeZone to ! CreateTemporalTimeZone("UTC").
output_time_zone = MUST(create_temporal_time_zone(global_object, "UTC"sv));
}
// 5. Let isoCalendar be ! GetISO8601Calendar().