1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 23:34:58 +00:00
Commit graph

9 commits

Author SHA1 Message Date
Timothy Flynn
f8763c16b2 LibJS: Disable Temporal custom time zone test
This test has been flaky for quite some time. Disable it for now, and
revisit once we've caught up with the Temporal spec.

See also: b7676cc436
2023-10-18 16:29:27 -04:00
davidot
cf0d30add6 LibJS: Add a function to ensure calls are made within the same second
Before these tests could be flaky if they happened to be called around
the edge of a second. Now we try up to 5 times to execute the tests
while staying within the same second.
2022-12-03 23:04:08 +00:00
davidot
1b0ca52c54 LibJS: Disallow one day long time zone offsets
This is a normative change in the Temporal spec.
See: 9cc8b29b
2022-10-14 11:23:50 +02:00
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
2c85f076c8 LibJS/Tests: Compare results in Temporal.Now.plainDateTime() test 2021-07-30 22:13:13 +01:00
Linus Groh
0bb19fc51c LibJS: Implement Temporal.Now.plainDateTime() 2021-07-27 19:51:44 +01:00