mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibJS: Implement Temporal.Instant.prototype.toString()
This commit is contained in:
parent
1c65ee6edf
commit
576be0f8e7
14 changed files with 396 additions and 6 deletions
|
@ -416,12 +416,12 @@ double get_offset_nanoseconds_for(GlobalObject& global_object, Value time_zone,
|
|||
}
|
||||
|
||||
// 11.6.12 BuiltinTimeZoneGetOffsetStringFor ( timeZone, instant ), https://tc39.es/proposal-temporal/#sec-temporal-builtintimezonegetoffsetstringfor
|
||||
Optional<String> builtin_time_zone_get_offset_string_for(GlobalObject& global_object, Object& time_zone, Instant& instant)
|
||||
Optional<String> builtin_time_zone_get_offset_string_for(GlobalObject& global_object, Value time_zone, Instant& instant)
|
||||
{
|
||||
auto& vm = global_object.vm();
|
||||
|
||||
// 1. Let offsetNanoseconds be ? GetOffsetNanosecondsFor(timeZone, instant).
|
||||
auto offset_nanoseconds = get_offset_nanoseconds_for(global_object, &time_zone, instant);
|
||||
auto offset_nanoseconds = get_offset_nanoseconds_for(global_object, time_zone, instant);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue