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
Timothy Flynn
b7676cc436
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.
2023-08-27 15:26:40 -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
a06bd451d4
LibJS: Implement Temporal.Now.zonedDateTimeISO()
2021-08-01 20:31:31 +01:00
Linus Groh
36c79c2989
LibJS: Implement Temporal.Now.zonedDateTime()
2021-08-01 20:31:31 +01: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
cab1015a03
LibJS/Tests: Fix Temporal.Now.plainDate{,ISO}() at end of month/year
...
Evidently, going one day forward on the last day of month increases the
month number by one and resets the day to 1. Doing the same on the last
day of the year resets the month to 1.
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
2c85f076c8
LibJS/Tests: Compare results in Temporal.Now.plainDateTime() test
2021-07-30 22:13:13 +01:00
Linus Groh
5e64156fce
LibJS: Implement Temporal.Now.plainTimeISO()
2021-07-28 21:57:30 +01:00
Linus Groh
af3a26f4cc
LibJS: Implement Temporal.Now.plainDateTimeISO()
2021-07-27 19:51:44 +01:00
Linus Groh
0bb19fc51c
LibJS: Implement Temporal.Now.plainDateTime()
2021-07-27 19:51:44 +01:00
Linus Groh
f2a2e8e13c
LibJS: Implement Temporal.Now.plainDateISO()
2021-07-27 19:51:44 +01:00
Linus Groh
c303bbde54
LibJS: Implement Temporal.Now.plainDate()
...
...and ten required AOs we didn't have yet:
- BalanceISODate
- BalanceISODateTime
- BalanceISOYearMonth
- BalanceTime
- BuiltinTimeZoneGetPlainDateTimeFor
- GetISOPartsFromEpoch
- GetOffsetNanosecondsFor
- ParseTemporalTimeZone
- SystemDateTime
- ToTemporalTimeZone
2021-07-27 19:51:44 +01:00
Linus Groh
ff307194f3
LibJS: Implement Temporal.Now[@@toStringTag]
2021-07-27 18:48:22 +01:00