Timothy Flynn
f6786881aa
LibJS: Implement the ECMA-402 definition of DefaultTimeZone
...
Simply defer to LibTimeZone to retrieve the system's current time zone.
Also update some Temporal tests to explicitly set the time zone to UTC.
2022-01-12 15:43:12 +01:00
davidot
c0a3b1467c
LibJS: Fix the Now.plainDateTime in case they go over a year boundary
...
Since years don't have a constant amount of seconds because they can be
leap years no constant will work in all cases. We now test a timezone in
both the positive and negative direction and check that at least one
worked. Assuming years are at least 2 days long this will always pass
at least one test.
2021-12-31 12:26:26 +01:00
Luke Wilde
3666d2132b
LibJS: Remove fallback value for get_offset_nanoseconds_for
...
This is a normative change in the Temporal spec.
See: 664f02d
Note that the tests are not comprehensive.
2021-11-17 11:30:13 +00:00
Linus Groh
95331ea864
LibJS/Tests: Fix Temporal.Now.plainDateTime{,ISO}() epoch calculation
...
Combining month and day like this doesn't always yield correct results.
Use dayOfYear multiplied by the seconds per day instead, which does.
2021-07-31 13:54:25 +01:00
Linus Groh
9ea8aa7ffe
LibJS/Tests: Compare results in Temporal.Now.plainDateTimeISO() test
2021-07-30 22:13:13 +01:00
Linus Groh
af3a26f4cc
LibJS: Implement Temporal.Now.plainDateTimeISO()
2021-07-27 19:51:44 +01:00