mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
![]() Year computation has to be based on seconds, not days, in case t is < 0 but t / __seconds_per_day is 0. Year computation also has to consider negative timestamps. With this, days is always positive and <= the number of days in the year, so base the tm_wday computation directly on the timestamp, and do it first, before t is modified in the year computation. In C, % can return a negative number if the left operand is negative, compensate for that. Tested via test-js. (Except for tm_wday, since we don't implement Date.prototype.getUTCDate() yet.) |
||
---|---|---|
.. | ||
Array | ||
BigInt | ||
Boolean | ||
Date | ||
Error | ||
Function | ||
functions | ||
Infinity | ||
JSON | ||
Math | ||
NaN | ||
Number | ||
Object | ||
Proxy | ||
Reflect | ||
String | ||
Symbol |