mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibJS: Implement most of GetTemporalRelativeToOption
Now that we have the Temporal.PlainDate object, we can flesh out this AO for such relative-to objects.
This commit is contained in:
parent
521638642f
commit
06593b1894
Notes:
github-actions[bot]
2024-11-23 13:47:14 +00:00
Author: https://github.com/trflynn89
Commit: 06593b1894
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2513
Reviewed-by: https://github.com/shannonbooth ✅
8 changed files with 189 additions and 5 deletions
|
@ -53,8 +53,14 @@ ThrowCompletionOr<String> to_temporal_time_zone_identifier(VM& vm, Value tempora
|
|||
if (!temporal_time_zone_like.is_string())
|
||||
return vm.throw_completion<TypeError>(ErrorType::TemporalInvalidTimeZoneName, temporal_time_zone_like);
|
||||
|
||||
return to_temporal_time_zone_identifier(vm, temporal_time_zone_like.as_string().utf8_string_view());
|
||||
}
|
||||
|
||||
// 11.1.8 ToTemporalTimeZoneIdentifier ( temporalTimeZoneLike ), https://tc39.es/proposal-temporal/#sec-temporal-totemporaltimezoneidentifier
|
||||
ThrowCompletionOr<String> to_temporal_time_zone_identifier(VM& vm, StringView temporal_time_zone_like)
|
||||
{
|
||||
// 3. Let parseResult be ? ParseTemporalTimeZoneString(temporalTimeZoneLike).
|
||||
auto parse_result = TRY(parse_temporal_time_zone_string(vm, temporal_time_zone_like.as_string().utf8_string_view()));
|
||||
auto parse_result = TRY(parse_temporal_time_zone_string(vm, temporal_time_zone_like));
|
||||
|
||||
// 4. Let offsetMinutes be parseResult.[[OffsetMinutes]].
|
||||
// 5. If offsetMinutes is not empty, return FormatOffsetTimeZoneIdentifier(offsetMinutes).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue