Smrtnyk
56abb01ee3
LibJS: Add explicit assertion for days
...
This is an editorial change in Temporal spec.
See: 15b7293b38
2022-11-11 12:14:46 +00:00
Smrtnyk
2ba2e6ca0a
LibJS: Rename ToShowTimeZoneNameOption to ToTimeZoneNameOption
...
This is an editorial change in Temporal spec.
See: ab5b1ba910
2022-11-05 15:44:49 +00:00
Smrtnyk
efe82e5c91
LibJS: Rename ToShowCalendarOption to ToCalendarNameOption
...
This is an editorial change in the Temporal spec.
See: 2c9e2615f7
2022-11-04 21:00:25 +00:00
Luke Wilde
ac67077b57
LibJS: Fix length of PlainDateTime.withPlainTime
...
withPlainTime's argument is optional, so the length of the function is
actually 0.
2022-11-03 21:09:58 +00:00
Luke Wilde
b26b18a0bc
LibJS: Add timeZoneName: "critical" option to ZonedDateTime.toString()
...
This is a normative change in the Temporal spec.
See: d84937f
2022-11-03 19:15:50 +00:00
Luke Wilde
4a167cfbec
LibJS: Add calendarName: "critical" option to toString() methods
...
This is a normative change in the Temporal spec.
See: e715a50
2022-11-03 19:15:50 +00:00
Luke Wilde
192aa75279
LibJS: Align ISO 8601 grammar with annotations from IXDTF
...
This is a normative change in the Temporal spec.
See: c64b844
2022-11-03 19:15:50 +00:00
Moustafa Raafat
939374a037
LibJS: Use the UnsignedBigInteger compare_to_double algorithm
...
This also avoids an unnecessary copy
2022-11-02 22:04:34 -06:00
Moustafa Raafat
54b8a2b094
LibCrypto: Add a way to compare UnsignedBigInteger with double
...
This patch also make SignedBigInteger::compare_to_double make use
of the new function.
2022-11-02 22:04:34 -06:00
Yedaya Katsman
dcad8494d6
LibJS: Accept calendar names case-insensitively
...
This is a normative change in the Temporal spec
See tc39/proposal-temporal@03101c6
2022-10-24 23:00:19 +01:00
davidot
3dc99af3dc
LibJS: Make parse_temporal_duration use the new double parser
2022-10-23 15:48:45 +02:00
Moustafa Raafat
5edd4bd512
LibJS: Require NanosecondsToDays remainder less than dayLength
...
This is an normative change in the Temporal spec.
See: ac69b63
2022-10-22 19:14:14 +02:00
Moustafa Raafat
b1c8029c2b
LibJS: Require that NanosecondsToDays doesn't flip sign
...
This is an normative change in the Temporal spec.
See: e13c52d
2022-10-22 19:14:14 +02:00
Moustafa Raafat
8f964604f0
LibJS: Refactor CalendarFields for better linearity
...
This is a normative change in the Temporal spec.
See: 9b139a1
2022-10-20 00:53:44 +02:00
Idan Horowitz
d38aeddd77
LibJS: Simplify ParseTemporalTimeZoneString
...
This is an editorial change in the Temporal spec.
See: eec8efab
2022-10-20 00:47:42 +02:00
Idan Horowitz
0c61552b81
LibJS: Refactor ToRelativeTemporalObject
...
This is an editorial change in the Temporal spec.
See: 895854d9
2022-10-20 00:47:42 +02:00
Moustafa Raafat
092b33c96e
LibJS: Remove trivial operations ISO{Year,Month,Day}
...
This is an editorial change in the Temporal spec.
See: 606d8a2
2022-10-19 22:39:33 +02:00
Moustafa Raafat
69d5368b2a
LibJS: Remove trivial operation IsValidISOMonth
...
This is an editorial change in the Temporal spec.
See: a08330a
2022-10-19 22:39:33 +02:00
Moustafa Raafat
48cc557dfa
LibJS: Merge ISOMonthCode and BuildISOMonthCode
...
This is an editorial change in the Temporal spec.
See: a4d17b1
2022-10-19 22:39:33 +02:00
Moustafa Raafat
b69ceae10c
LibJS: Improve alias names in ResolveISOMonth
...
This is an editorial change in the Temporal spec.
See: 01d5fbe
2022-10-19 22:39:33 +02:00
Moustafa Raafat
d758566996
LibJS: Simplify ResolveISOMonth
...
This is an editorial change in the Temporal spec.
See: 1b83226
2022-10-19 22:39:33 +02:00
Linus Groh
b79b78a5cc
LibJS: Sync the set of rounding modes
...
This is a normative change in the Temporal spec.
See:
- 9613358
- 4c45464
2022-10-17 13:31:22 +02:00
Linus Groh
3d4ce3cc6d
LibJS: Add missing validation to remaining Calendar operations
...
This is a normative change in the Temporal spec.
See: c2a0cea
2022-10-17 12:56:05 +02:00
Linus Groh
4567ded8e4
LibJS: Reject relativeTo string such as "2022-08-18T17:01Z"
...
This is a normative change in the Temporal spec.
See: 2dc20bf
2022-10-17 12:56:05 +02:00
Linus Groh
57162ad510
LibJS: Rename IsValidTimeZoneName to IsAvailableTimeZoneName
...
This is an editorial change in the Temporal spec.
See: 873313b
2022-10-17 12:56:05 +02:00
Linus Groh
72997c6b77
LibJS: Define IsValidTimeZoneName in terms of AvailableTimeZones
...
This is an editorial change in the Temporal spec.
See: d83dcf0
Note that even though we already implement AvailableTimeZones for Intl,
I kept the existing implementation calling into LibTimeZone directly.
2022-10-17 12:56:05 +02:00
Linus Groh
b6f101f1c0
LibJS: Fix TemporalCalendarString ambiguity
...
This is a normative change in the Temporal spec.
See:
- 278d238
- b73aea7
2022-10-16 15:20:23 +02:00
Linus Groh
484c66125d
LibJS: Rename Get{IANA => Named}TimeZonePreviousTransition
...
This is an editorial change in the Temporal spec.
See: 6b759d1
2022-10-16 14:45:09 +02:00
Linus Groh
8cc260107d
LibJS: Rename Get{IANA => Named}TimeZoneNextTransition
...
This is an editorial change in the Temporal spec.
See: 4b0246a
2022-10-16 14:45:09 +02:00
Idan Horowitz
d795f9c6cf
LibJS: Change dateAdd to a required parameter of MoveRelativeDate
...
This is an editorial change in the Temporal spec.
See: 45d9079
2022-10-16 13:45:56 +02:00
Idan Horowitz
3c55643283
LibJS: Add dateAdd to all remaining MoveRelativeDate calls
...
This is a normative change in the Temporal spec.
See: a48838a
2022-10-16 13:45:56 +02:00
Idan Horowitz
4e79ce4e7a
LibJS: Add optional dateAdd parameter to MoveRelativeDate
...
This is a normative change in the Temporal spec.
See: 891060f
2022-10-16 13:45:56 +02:00
Luke Wilde
35c9e324b4
LibJS: Add fast path TimeZone conversion to PlainDate#toZonedDateTime
...
This is a normative chane in the Temporal spec.
See: fcab1af
2022-10-16 13:40:21 +02:00
Luke Wilde
707f12f927
LibJS: Remove extra property check from Instant#toZonedDateTimeISO
...
This is a normative change in the Temporal spec.
See: 7dfbd80
2022-10-16 13:40:21 +02: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
Luke Wilde
8c3512d6ce
LibJS: Fast-path ToTemporalCalendar when the argument is a Calendar
...
This is a normative change in the Temporal spec.
See: 2a43b39
2022-10-16 13:40:21 +02:00
Timothy Flynn
443ffab9dc
LibJS: Use infallible ParseTimeZoneOffsetString
...
This is an editorial change in the Temporal spec. See:
654e300
2022-10-15 18:05:02 +02:00
Timothy Flynn
d992cba014
LibJS: Remove Temporal::DefaultTimeZone
...
This is an editorial change in the Temporal spec. See:
e232580
2022-10-15 18:05:02 +02:00
Timothy Flynn
735e1c4e20
LibJS: Replace GetIANATimeZoneOffset[Ns] with GetNamedTimeZoneOffset[Ns]
...
This is an editorial change in the Temporal spec. See:
e44d36b
2022-10-15 18:05:02 +02:00
Timothy Flynn
053cc90dbe
LibJS: Replace GetIANATimeZoneEpochValue with GetNamedTimeZoneEpoch[Ns]
...
This is an editorial change in the Temporal spec. See:
e834014
2022-10-15 18:05:02 +02:00
Timothy Flynn
1a84dbcb07
LibJS: Replace GetEpochFromISOParts with GetUTCEpochNanoseconds
...
This is an editorial change in the Temporal spec. See:
1b051cc
Note that since Date's implementation of this AO uses Crypto bigints
rather than allocating JS bigints, this change has the fallout of
removing some unused VM parameters and adding an overload of the
IsValidEpochNanoseconds AO for use without a JS::BigInt.
2022-10-15 18:05:02 +02:00
Timothy Flynn
4fbec2e8b3
LibJS: Replace RoundTowardsZero with truncate
...
This is an editorial change in the Temporal spec. See:
409ab66
2022-10-15 18:05:02 +02:00
snooze6214
1fde3737f4
LibJS: Move time zone annotation parsing into ParseISODateTime
...
This is an editorial change in the Temporal spec.
See: tc39/proposal-temporal@c410e25e47
2022-10-15 05:09:09 +00:00
Luke Wilde
d5d1146cc3
LibJS/Temporal: Fix inconsistency in order of observable operations
...
This is a normative change in the Temporal spec.
See: a3a8237
2022-10-14 18:55:12 +02:00
davidot
1be337353b
LibJS: Make sure to exactly add nanoseconds in add_duration
...
If the given nanoseconds values add to something above 2**53 - 1 we are
potentially rounding the double to some near integer value.
2022-10-14 11:23:50 +02: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
Ben Wiederhake
48d8aff436
LibJS: Add missing includes
...
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:
// file: compile_me.cpp
#include <LibJS/Runtime/StringPrototype.h>
// That's it, this was enough to cause a compilation error.
Likewise for most other files touched by this commit.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
4cd382c621
LibJS: Break another inclusion cycle by removing unnecessary include
2022-09-17 04:00:54 +00:00
Timothy Flynn
85e313077a
LibJS: Do not invoke Cell::vm in constructors before Cell is constructed
...
In a subclass of Cell, we cannot use Cell::vm() before the base Cell
object itself is constructed. Use the Realm's VM instead.
This was caught by UBSAN with vptr sanitation enabled.
2022-09-15 09:45:13 +02:00
Timothy Flynn
85994d6115
LibJS: Remove unused include from JS::Temporal::Calendar
2022-09-05 14:37:16 -04:00