1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 06:47:34 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins
Timothy Flynn d83ce7dd0b LibJS: Re-implement the Date constructor / prototype for spec compliance
First, this adds a constructor to the Date object to be created from a
plain double. This is a first step to removing Core::DateTime as the
basis for the Date object. A subsequent commit will remove the now-
unused data from the object.

Next, this implements the constructor in accordance to the spec. The
constructor when NewTarget is undefined no longer allocates a Date on
the heap. The other constructor properly uses recently created AOs to
handle time zone and ensure the created [[DateValue]] is valid. Other
methods on the constructor (Date.now) have not been touched yet.

Last, the prototype is reimplemented. Again, we use other AOs to handle
time zones and time clipping. Not all prototypes are fixed; most of them
are, but a few (e.g. Date.prototype.getTimezoneOffset) were not fixed,
but left in a mostly unimplemented state for another commit.

In all of the above, spec comments are added. This is a rather large
change; but it's tough to do any of these parts individually without
breaking everything else.
2022-01-15 20:13:48 +01:00
..
AggregateError LibJS: Implement the Error Cause proposal 2021-06-11 21:34:05 +01:00
Array LibJS: Add tests for all the unscopable Array prototype properties 2022-01-05 20:31:25 +01:00
ArrayBuffer LibJS: ArrayBuffer.prototype.slice 2021-04-03 16:24:44 +02:00
Atomics LibJS: Implement Atomics.isLockFree 2021-07-14 22:13:15 +01:00
BigInt LibCrypto: Fix subtracting two negative SignedBigIntegers 2021-11-16 10:06:53 +00:00
Boolean LibJS: Change wording of ErrorType::NotA to be independent of context 2021-09-12 00:16:39 +02:00
DataView LibJS: Use Checked<T> for offsets in the SetViewValue AO 2021-08-11 22:56:58 +01:00
Date LibJS: Re-implement the Date constructor / prototype for spec compliance 2022-01-15 20:13:48 +01:00
Error LibJS: Implement the Error Cause proposal 2021-06-11 21:34:05 +01:00
FinalizationRegistry test-js: Add a mark_as_garbage method to force GC to collect that object 2021-09-08 08:53:02 +01:00
Function LibJS: Change wording of ErrorType::NotA to be independent of context 2021-09-12 00:16:39 +02:00
functions LibJS: Correcly handle surrogates in escape() 2022-01-14 10:59:46 +01:00
Infinity Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Intl LibJS: Handle the [[LanguageDisplay]] tag when localizing languages 2022-01-13 23:05:31 +01:00
JSON LibJS: Dont try to serialize symbol-keyed properties 2021-04-16 19:22:29 +02:00
Map LibJS/Tests: Test iteration order of Map.prototype.entries() 2021-08-13 23:54:08 +01:00
Math LibJS: Correctly handle mixing +0 and -0 in Math.{min,max}() 2021-04-23 20:51:48 +02:00
NaN Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Number LibJS: Implement Number.prototype.toExponential 2022-01-04 13:07:42 +00:00
Object Everywhere: Fix spelling mistakes 2022-01-07 15:44:42 +01:00
Promise LibJS: Don't coerce this value to object in Promise.prototype.finally() 2021-11-14 15:27:46 +00:00
Proxy LibJS: Throw InternalErrors instead of Errors on CallStackSizeExceeded 2021-11-27 01:58:05 +02:00
Reflect LibJS: Implement [[Call]] and [[Construct]] internal slots properly 2021-10-09 14:29:20 +01:00
RegExp LibJS: Create the RegExpExec result's "input" field last 2021-11-08 01:36:29 +01:00
Set LibJS: Add the SetIterator built-in and Set.prototype.{values, entries} 2021-06-09 11:48:04 +01:00
ShadowRealm LibJS: Implement ShadowRealm.prototype.importValue() 2021-10-15 09:36:21 +01:00
String LibJS: Fix substr() with negative arguments larger than string length 2022-01-14 11:12:24 +01:00
Symbol LibJS: Rename OrdinaryFunctionObject to ECMAScriptFunctionObject 2021-09-25 17:51:30 +02:00
Temporal LibJS: Don't validate time zone name when parsing Instant string 2022-01-13 10:08:34 +01:00
TypedArray LibJS: Add TypedArray.prototype.@@iterator 2021-12-21 15:40:41 +01:00
WeakMap test-js: Add a mark_as_garbage method to force GC to collect that object 2021-09-08 08:53:02 +01:00
WeakRef LibJS: Add the WeakRef.prototype.deref method 2021-06-12 18:39:23 +01:00
WeakSet test-js: Add a mark_as_garbage method to force GC to collect that object 2021-09-08 08:53:02 +01:00