mirror of
https://github.com/RGBCube/serenity
synced 2025-07-03 05:32:13 +00:00
![]() 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. |
||
---|---|---|
.. | ||
Date.js | ||
Date.now.js | ||
Date.parse.js | ||
Date.prototype.getDate.js | ||
Date.prototype.getDay.js | ||
Date.prototype.getFullYear.js | ||
Date.prototype.getHours.js | ||
Date.prototype.getMilliseconds.js | ||
Date.prototype.getMinutes.js | ||
Date.prototype.getMonth.js | ||
Date.prototype.getSeconds.js | ||
Date.prototype.getTime.js | ||
Date.prototype.getUTCDate.js | ||
Date.prototype.getUTCDay.js | ||
Date.prototype.getUTCFullYear.js | ||
Date.prototype.getUTCHours.js | ||
Date.prototype.getUTCMilliseconds.js | ||
Date.prototype.getUTCMinutes.js | ||
Date.prototype.getUTCMonth.js | ||
Date.prototype.getUTCSeconds.js | ||
Date.prototype.setDate.js | ||
Date.prototype.setFullYear.js | ||
Date.prototype.setHours.js | ||
Date.prototype.setMilliseconds.js | ||
Date.prototype.setMinutes.js | ||
Date.prototype.setMonth.js | ||
Date.prototype.setSeconds.js | ||
Date.prototype.setTime.js | ||
Date.prototype.toISOString.js | ||
Date.prototype.toLocaleDateString.js | ||
Date.prototype.toLocaleString.js | ||
Date.prototype.toLocaleTimeString.js | ||
Date.prototype.toTemporalInstant.js | ||
Date.UTC.js |