1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 22:14:59 +00:00
Commit graph

10 commits

Author SHA1 Message Date
Luke Wilde
588dae8aa6 LibJS/Temporal: Allow annotations after YYYY-MM and MM-DD
This is a normative change in the Temporal spec.

See: 160e836
2023-02-11 18:42:32 +00:00
Linus Groh
b0e7d59b8b LibJS: Throw on conversion from TimeZone to Calendar and vice versa
This is a normative change in the Temporal spec.

See: 2084e77
2022-12-02 02:04:13 +01:00
Luke Wilde
f7bb79d6d1 LibJS: Fast-path ToTemporalTimeZone when the argument is a TimeZone
This is a normative change in the Temporal spec.

See: 54cea53
2022-10-16 13:40:21 +02:00
Linus Groh
6850f25840 LibJS: Support IANA legacy names in the Temporal ISO 8601 grammar
This is a normative change in the Temporal spec.

See: 2419680
2022-07-30 10:50:50 +01:00
Linus Groh
3720f4bd8f LibJS: Fix production for time zone name in time zone strings
This is a normative change in the Temporal spec.

See:
- caf013a
- fb7cfa6
2022-06-29 07:35:42 +01:00
Linus Groh
b020b8eea2 LibJS: Handle Etc/GMT timezones properly in TimeZone{IANA,Bracketed}Name
This is a normative change in the Temporal spec.

See: 8c73780
2022-03-31 17:09:10 +01:00
Linus Groh
392f5bfebd LibJS: Fix fraction substring range in parse_temporal_time_zone_string()
Two issues:

- The intended range was 9 characters starting from index 1. Since the
  second argument to String::substring() is the length, 10 is
  potentially reading further than the string's length (when only
  providing one fraction digit), causing an assertion failure crash.
- The spec's intention to skip the decimal separator by starting at
  index 1 is incorrect, no decimal separator is present in the result of
  parsing TimeZoneUTCOffsetFractionalPart. I filed a spec fix for this,
  see: https://github.com/tc39/proposal-temporal/pull/1999
2022-01-12 21:24:12 +01:00
Linus Groh
027e4bd439 LibJS: Fix calculation overflow in parse_temporal_time_zone_string()
As all variables and numeric literals in the expression have an integral
data type, it would evaluate to an int and could easily overflow as
we're multiplying seconds with 10^9.

Introduce a floating point literal into the expression to make it result
in a double.
2022-01-12 21:24:12 +01:00
Linus Groh
d527eb62da LibJS: Support non-UTC time zones in Temporal :^)
We can now recognize & normalize all time zones from the IANA time zone
database and not just 'UTC', which makes the LibJS Temporal
implementation a lot more useful! Thanks to the newly added LibTimeZone,
this was incredibly easy to implement :^)

This already includes these recent editorial changes in the Temporal
spec: 27bffe1
2022-01-11 22:17:39 +01:00
Linus Groh
f987c11464 LibJS: Implement Temporal.TimeZone.from() 2021-08-01 10:24:38 +01:00