mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibJS: Reflect recent editorial changes in the Temporal proposal
See: -2148441
-08c04cc
-b77da58
This commit is contained in:
parent
5c77885873
commit
d159938acc
5 changed files with 16 additions and 12 deletions
|
@ -76,7 +76,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from)
|
|||
|
||||
// 1. If Type(item) is Object and item has an [[InitializedTemporalInstant]] internal slot, then
|
||||
if (item.is_object() && is<Instant>(item.as_object())) {
|
||||
// a. Return ? CreateTemporalInstant(item.[[Nanoseconds]]).
|
||||
// a. Return ! CreateTemporalInstant(item.[[Nanoseconds]]).
|
||||
return create_temporal_instant(global_object, *js_bigint(vm.heap(), static_cast<Instant&>(item.as_object()).nanoseconds().big_integer()));
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_seconds)
|
|||
return {};
|
||||
}
|
||||
|
||||
// 5. Return ? CreateTemporalInstant(epochNanoseconds).
|
||||
// 5. Return ! CreateTemporalInstant(epochNanoseconds).
|
||||
return create_temporal_instant(global_object, *epoch_nanoseconds);
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_milliseconds)
|
|||
return {};
|
||||
}
|
||||
|
||||
// 5. Return ? CreateTemporalInstant(epochNanoseconds).
|
||||
// 5. Return ! CreateTemporalInstant(epochNanoseconds).
|
||||
return create_temporal_instant(global_object, *epoch_nanoseconds);
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_microseconds)
|
|||
return {};
|
||||
}
|
||||
|
||||
// 4. Return ? CreateTemporalInstant(epochNanoseconds).
|
||||
// 4. Return ! CreateTemporalInstant(epochNanoseconds).
|
||||
return create_temporal_instant(global_object, *epoch_nanoseconds);
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ JS_DEFINE_NATIVE_FUNCTION(InstantConstructor::from_epoch_nanoseconds)
|
|||
return {};
|
||||
}
|
||||
|
||||
// 3. Return ? CreateTemporalInstant(epochNanoseconds).
|
||||
// 3. Return ! CreateTemporalInstant(epochNanoseconds).
|
||||
return create_temporal_instant(global_object, *epoch_nanoseconds);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue