Linus Groh
709e16004d
LibJS: Assert RoundISODateTime is called with values within the limits
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/eaa7042
2022-06-24 22:12:03 +01:00
Linus Groh
52a4ee563d
LibJS: Assume options is an object in the MergeLargestUnitOption AO
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/20a04ac
2022-06-15 17:49:20 +01:00
Linus Groh
8be4cc9653
LibJS: Make options mandatory in Difference{Zoned,ISO}DateTime
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/d4c4a16
2022-06-15 17:49:20 +01:00
Linus Groh
9bcd88828f
LibJS: Fold ToPartialTime into ToTemporalTimeRecord
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/58e476d
2022-06-15 17:49:20 +01:00
Linus Groh
3e6561c75f
LibJS: Fold PreparePartialTemporalFields into PrepareTemporalFields
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6ed1835
2022-06-15 17:49:20 +01:00
Linus Groh
4c77575ec5
LibJS: Simplify Temporal unit AOs
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/1b3d018
2022-06-10 12:39:11 +02:00
Linus Groh
cc8f5151d7
LibJS: Refactor Temporal since/until to common AOs
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/85a9f57
2022-05-08 00:07:58 +02:00
Linus Groh
de0ea331cd
LibJS: Simplify BalanceISODate
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/9544573
2022-05-08 00:07:58 +02:00
Linus Groh
c6f7214a60
LibJS: Replace magic nanosecond numbers with constants
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/3fdbfda
2022-05-08 00:07:58 +02:00
Linus Groh
3729a910f6
LibJS: Refactor Temporal add/subtract to common AOs
...
This is an editorial change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/2f96efc
- https://github.com/tc39/proposal-temporal/commit/fbff635
2022-05-08 00:07:58 +02:00
Linus Groh
f7c9bd0760
LibJS: Convert remaining Date AOs using JS::Value as in/output to double
...
There was an awful lot of JS::Value <-> double conversion going on, even
through these AOs only work with number values anyway.
They don't need a global object either as they won't allocate or throw,
that was simply to pass it to infallible calls of ToIntegerOrInfinity.
2022-05-06 22:32:47 +02:00
Linus Groh
27793bf76c
LibJS: Replace U+2212 MINUS SIGN with U+002D HYPHEN-MINUS
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/bbcd37b
2022-04-29 22:40:46 +02:00
Linus Groh
76a6bd0e75
LibJS: Fix numeric type confusion in GetEpochFromISOParts return value
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/2a59eac
2022-04-29 22:40:46 +02:00
Linus Groh
70593b7448
LibJS: Update for structured headers added to various Temporal AOs
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/e6a15a5
2022-04-29 22:40:46 +02:00
Linus Groh
2499911898
LibJS: Rename DateFromFields to CalendarDateFromFields, etc
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/fd27b54
2022-04-29 22:40:46 +02:00
Linus Groh
5397278bfc
LibJS: Update spec comments to use ToZeroPaddedDecimalString AO
...
This is an editorial change in the ECMA-262 and Temporal specs.
See:
- https://github.com/tc39/ecma262/commit/843d8b8
- https://github.com/tc39/proposal-temporal/commit/f9211d9
Note that we don't actually need to implement the AO as we already have
String::formatted() for this, and use unified format strings instead of
zero-padding in individual steps in many cases anyway.
2022-04-12 23:43:29 +01:00
Linus Groh
e109b967a1
LibJS: Make options object const in more Temporal AOs
2022-04-08 00:43:17 +01:00
Linus Groh
2844a2c448
LibJS: Handle undefined options in MergeLargestUnitOption
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/5e161a2
2022-04-08 00:43:17 +01:00
Linus Groh
151eb8606d
LibJS: Consistently call observable Temporal AOs with undefined options
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6fa5b9d
2022-04-07 12:58:39 +01:00
Idan Horowitz
086969277e
Everywhere: Run clang-format
2022-04-01 21:24:45 +01:00
Linus Groh
cfb04765fa
LibJS: Correct PlainYearMonth arithmetic for non-ISO calendars
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/61e8dd0
2022-03-31 17:09:10 +01:00
Linus Groh
360c65e92b
LibJS: Change balance_duration() nanoseconds from a JS to Crypto BigInt
...
Similar to the preceding commit.
2022-03-19 19:28:49 +00:00
Linus Groh
68af8649fb
LibJS: Follow rules for consuming completion records
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/1c19b96
2022-03-10 23:20:39 +01:00
Linus Groh
4ceff91893
LibJS: Use different variable name in DifferenceISODateTime
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/c32cc4d
2022-03-10 23:20:39 +01:00
Linus Groh
17da627b4c
LibJS: Fix "set it to" language to be more explicit
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/de58241
2022-03-10 23:20:39 +01:00
Linus Groh
a496868ee5
LibJS: Create Duration Records with their own abstract operations
...
This is an editorial change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/387c405
- https://github.com/tc39/proposal-temporal/commit/b203e26
- https://github.com/tc39/proposal-temporal/commit/387c405
2022-03-10 23:20:39 +01:00
Linus Groh
64e43c89bc
LibJS: Remove assertions that are now part of structured headers
...
This is an editorial change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/7fbdd28
- https://github.com/tc39/proposal-temporal/commit/f666243
- https://github.com/tc39/proposal-temporal/commit/8c7d066
- https://github.com/tc39/proposal-temporal/commit/307d108
- https://github.com/tc39/proposal-temporal/commit/d9ca402
In practical terms this means we can now get rid of a couple of awkward
assertion steps that were no-ops anyway, since the types are enforced
by the compiler.
2022-03-10 23:20:39 +01:00
Linus Groh
bdb13a74b0
LibJS: Describe various kinds of "Duration Records"
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/983902e
We already had these defined as structs, but now they're properly
defined in the spec (opposed to the previous anonymous records), and we
don't have to make up our own names anymore :^)
Note that while we're usually not including 'record' in the name, in
this case the 'Duration Record' has a name clash with the Duration
object. Additionally, later editorial changes introduce CreateFooRecord
AOs, so let's just go with FooRecord structs here.
2022-03-10 23:20:39 +01:00
Timothy Flynn
1039159a6c
LibJS: Change LargerOfTwoTemporalUnits AO to return a StringView
2021-11-30 00:01:07 +00:00
Linus Groh
a20b189eab
LibJS: Fix incorrectly formatted section comments
...
A couple of missing URLs, spaces, and a stray comma.
2021-11-24 17:37:27 +00:00
Luke Wilde
29072f4b09
LibJS: Implement the required AOs for Temporal.Duration.compare
2021-11-11 21:06:54 +00:00
Linus Groh
36b51276d5
LibJS: Change calendar_date_add() date parameter from PlainDate to Value
...
Turns out use of this AO is a bit more flexible than I anticipated.
2021-11-07 15:31:28 +01:00
Luke Wilde
b2bbd4d2b8
LibJS: Implement Temporal.PlainDateTime.prototype.toString
2021-11-03 11:03:30 +01:00
Linus Groh
d49bbb1da3
LibJS: Implement TODO()'d parts of balance_duration()
...
Massive :yakstack:, so I understand why it was skipped in the first
place :^)
2021-11-02 09:24:35 +01:00
Linus Groh
97f6c6029f
LibJS: Implement Temporal.TimeZone.prototype.getInstantFor()
2021-11-01 21:39:45 +01:00
Linus Groh
4d8912a92b
LibJS: Convert to_string() to ThrowCompletionOr
...
Also update get_function_name() to use ThrowCompletionOr, but this is
not a standard AO and should be refactored out of existence eventually.
2021-10-13 09:55:10 +01:00
Linus Groh
f90d98aef0
LibJS: Update step order in the InterpretTemporalDateTimeFields AO
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/be88667
2021-09-18 13:38:48 +02:00
Linus Groh
d764f1c699
LibJS: Convert PlainDateTime AOs to ThrowCompletionOr
2021-09-17 23:43:01 +02:00
Linus Groh
20337a34a2
LibJS: Convert Instant AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01:00
Linus Groh
f8d92232c8
LibJS: Convert Calendar AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01:00
Linus Groh
6b4777c558
LibJS: Convert prepare_temporal_fields() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
3c530dec5a
LibJS: Convert parse_temporal_date_time_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
9f03647f1f
LibJS: Convert to_temporal_overflow() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Idan Horowitz
229a5ce149
LibJS: Convert PlainTime AOs to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Idan Horowitz
cc00a726a8
LibJS: Convert TimeZone AOs to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Idan Horowitz
5a4c90fcb1
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Linus Groh
e4c07c5b8f
LibJS: Make new_target parameter of all Temporal AOs a const*
...
These are passed to ordinary_create_from_constructor() in each case,
which takes the parameter as a const&, so these can also be const.
2021-09-09 23:46:45 +01:00
Linus Groh
81aaa9ccd5
LibJS: Replace String const& with StringView in various Temporal AOs
...
This is especially helpful where we already pass StringView literals
and only compare them with others, e.g. overflow and largest/smallest
unit, in which case there's no need to actually allocate a string.
2021-09-08 23:42:26 +01:00
Linus Groh
8105d3f3d6
LibJS: Change offset in ISODateTimeWithinLimits to actually 24h
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/1d61d6f
2021-09-01 15:11:35 +01:00
Linus Groh
576be0f8e7
LibJS: Implement Temporal.Instant.prototype.toString()
2021-08-31 16:35:51 +02:00