Linus Groh
a422ea8792
LibJS: Make get_string_or_number_option() options Object a const&
...
This only passes the options Object to get_option(), which now takes a
const reference.
2021-09-09 23:46:45 +01:00
Linus Groh
c099b1b8a5
LibJS: Make get_option() options Object a const&
...
This only calls Object::get() on the options Object, which is
const-qualified.
2021-09-09 23:46:45 +01:00
Linus Groh
5ae6ad8557
LibJS: Store Instant's and ZonedDateTime's m_nanoseconds as a const&
...
There's no need for these to be non-const. Suggested by @IdanHo in
https://github.com/SerenityOS/serenity/pull/9904#discussion_r704960184 .
Perhaps we can make more internal slots of these and other objects const
references as well, but that's a bit more involved as they are used by
various functions expecting non-const references.
2021-09-09 23:46:45 +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
92363a4ef8
LibJS: Mark TemporalTimeToString as infallible
...
This is an editorial change in the Temporal spec.
See: 899cc24
2021-09-09 18:24:18 +01:00
Luke Wilde
90ada407db
LibJS: Implement Temporal.PlainYearMonth.compare
2021-09-09 09:06:23 +01:00
Luke Wilde
092ec0cecf
LibJS: Implement Temporal.PlainYearMonth.from
2021-09-09 09:06:23 +01:00
Luke Wilde
58e2597dc2
LibJS: Implement Temporal.PlainYearMonth.prototype.equals
2021-09-09 09:06:23 +01:00
Luke Wilde
ff0b01a505
LibJS: Implement ToTemporalYearMonth AO
2021-09-09 09:06:23 +01:00
Linus Groh
d3fcf5a570
LibJS: Implement Temporal.Instant.prototype.toZonedDateTimeISO()
2021-09-09 08:52:48 +01:00
Linus Groh
6607d1dfb1
LibJS: Implement Temporal.Instant.prototype.toZonedDateTime()
2021-09-09 08:52:48 +01:00
Linus Groh
9661d15fe2
LibJS: Implement Temporal.PlainTime.prototype.toJSON()
2021-09-08 23:42:26 +01:00
Linus Groh
6987e326d8
LibJS: Implement Temporal.PlainTime.prototype.toLocaleString()
2021-09-08 23:42:26 +01:00
Linus Groh
9f78a957d5
LibJS: Implement Temporal.PlainTime.prototype.toString()
2021-09-08 23:42:26 +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
Luke Wilde
d943b8f100
LibJS: Implement Temporal.PlainTime.prototype.with
...
Ticks off one box in #8982 and fixes one test262 case.
2021-09-08 19:57:29 +01:00
Linus Groh
33f76f88bb
LibJS: Add and use the CreateNegatedTemporalDuration AO
...
This is a normative change in the Temporal spec.
See: 6178ed3
2021-09-08 00:07:18 +01:00
Linus Groh
f046a4a75d
LibJS: Make implementation-defined language more concise
...
This is a normative change in the Temporal spec. No behavioral change,
just a clarification.
See: 42c964e
2021-09-08 00:07:18 +01:00
Linus Groh
86a7c795f6
LibJS: Use the newly added remainder operation in GetISOPartsFromEpoch
...
This is a normative change in the Temporal spec. No behavioral change,
just a clarification.
See: b7bdc65
2021-09-08 00:07:18 +01:00
Linus Groh
97cc8f4613
LibJS: Validate Calendar.prototype.fields() values more strictly
...
This is a normative change in the Temporal spec.
See:
- 75b66d8
- 9c2262b
2021-09-08 00:07:18 +01:00
Andreas Kling
6ad427993a
Everywhere: Behaviour => Behavior
2021-09-07 13:53:14 +02:00
Idan Horowitz
456938add0
LibJS: Use StringViews in Round{NumberToIncrement, TemporalInstant}
2021-09-06 22:15:39 +01:00
Idan Horowitz
4b5aa2102c
LibJS: Implement Temporal.Instant.prototype.since
2021-09-06 22:15:39 +01:00
Idan Horowitz
470499b2a8
LibJS: Implement Temporal.Instant.prototype.until
2021-09-06 22:15:39 +01:00
Idan Horowitz
24b78fff7d
LibJS: Add a bunch of Temporal Abstract Operations
...
These will allow us to (partially) implement
Temporal.Instant.prototype.{until, since}
2021-09-06 22:15:39 +01:00
Linus Groh
3492fbf9cf
LibJS: Account for negative numbers in ToTemporalDurationRecord
...
This is a normative change in the Temporal spec.
See: fa9d547
2021-09-02 20:16:44 +01:00
Linus Groh
0e6d503317
LibJS: Throw RangeError for non-integral values in ToPartialDuration
...
This is a normative change in the Temporal spec.
See: 895c8e5
2021-09-02 20:16:44 +01:00
Linus Groh
7acd174c85
LibJS: Reflect normative changes in ParseTemporalInstantString
...
Most of it doesn't affect us yet as the parsing code and additional AOs
are not implemented yet.
See: f6ac475
2021-09-02 20:16:44 +01:00
Linus Groh
8105d3f3d6
LibJS: Change offset in ISODateTimeWithinLimits to actually 24h
...
This is a normative change in the Temporal spec.
See: 1d61d6f
2021-09-01 15:11:35 +01:00
Linus Groh
59df50a950
LibJS: Throw RangeError for +/-∞ argument values in Temporal.Duration()
...
This is a normative change in the Temporal spec.
See: ababe1b
2021-09-01 15:11:35 +01:00
Linus Groh
f169ad61a4
LibJS: Make 'options' argument of Calendar prototype functions optional
...
This is a normative change in the Temporal spec.
See: 9cc913e
2021-09-01 15:11:35 +01:00
Linus Groh
ed98c1afc7
LibJS: Throw RangeError in PrepareTemporalFields for +/-∞
...
This is a normative change in the Temporal spec.
See: 499282a
2021-09-01 15:11:35 +01:00
Linus Groh
e845e7c814
LibJS: Throw TypeError if Instant.prototype.round() options is undefined
...
This is a normative change in the Temporal spec.
See: 943018f
2021-09-01 15:11:35 +01:00
Linus Groh
38bef3e28e
LibJS: Handle undefined, NaN, and Infinity in ToTemporalDurationRecord
...
This is a normative change in the Temporal spec.
See: d4b9bcf
2021-09-01 15:11:35 +01:00
Linus Groh
c171aa40a8
LibJS: Implement Temporal.Instant.prototype.toJSON()
2021-08-31 16:35:51 +02:00
Linus Groh
463eb361ad
LibJS: Implement Temporal.Instant.prototype.toLocaleString()
2021-08-31 16:35:51 +02:00
Linus Groh
576be0f8e7
LibJS: Implement Temporal.Instant.prototype.toString()
2021-08-31 16:35:51 +02:00
Linus Groh
e3254bf4c5
LibJS: Implement Temporal.Calendar.prototype.dateAdd()
2021-08-30 22:33:10 +01:00
Linus Groh
a8329272cc
LibJS: Implement Temporal.ZonedDateTime.prototype.eraYear
2021-08-27 23:36:52 +01:00
Linus Groh
b59e9260db
LibJS: Implement Temporal.ZonedDateTime.prototype.era
2021-08-27 23:36:52 +01:00
Linus Groh
f59e4d6738
LibJS: Implement Temporal.PlainYearMonth.prototype.eraYear
2021-08-27 23:36:52 +01:00
Linus Groh
b11ea98648
LibJS: Implement Temporal.PlainYearMonth.prototype.era
2021-08-27 23:36:52 +01:00
Linus Groh
f2f671f340
LibJS: Implement Temporal.PlainDateTime.prototype.eraYear
2021-08-27 23:36:52 +01:00
Linus Groh
276d3f5089
LibJS: Implement Temporal.PlainDateTime.prototype.era
2021-08-27 23:36:52 +01:00
Linus Groh
418c22f9b3
LibJS: Implement Temporal.PlainDate.prototype.eraYear
2021-08-27 23:36:52 +01:00
Linus Groh
6f7d6d917e
LibJS: Implement Temporal.PlainDate.prototype.era
2021-08-27 23:36:52 +01:00
Linus Groh
c3e0d78ba6
LibJS: Implement Temporal.Calendar.prototype.eraYear()
2021-08-27 23:36:52 +01:00
Linus Groh
f746850d1c
LibJS: Implement Temporal.Calendar.prototype.era()
2021-08-27 23:36:52 +01:00
Idan Horowitz
24dbf18936
LibJS: Implement Temporal.PlainDateTime.prototype.withPlainTime()
2021-08-27 19:01:30 +01:00
Idan Horowitz
0f464f38d3
LibJS: Implement Temporal.PlainTime.prototype.equals()
2021-08-27 19:01:30 +01:00