mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibJS: Rename IsValidTimeZoneName to IsAvailableTimeZoneName
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/873313b
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 05:39:06 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/57162ad510 Pull-request: https://github.com/SerenityOS/serenity/pull/15662 Reviewed-by: https://github.com/davidot
@@ -224,8 +224,8 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
|
||||
// a. Set timeZone to ? ToString(timeZone).
|
||||
time_zone = TRY(time_zone_value.to_string(vm));
|
||||
|
||||
// b. If the result of IsValidTimeZoneName(timeZone) is false, then
|
||||
if (!Temporal::is_valid_time_zone_name(time_zone)) {
|
||||
// b. If IsAvailableTimeZoneName(timeZone) is false, then
|
||||
if (!Temporal::is_available_time_zone_name(time_zone)) {
|
||||
// i. Throw a RangeError exception.
|
||||
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, time_zone, vm.names.timeZone);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user