Linus Groh
32c52e3511
LibJS: Add missing spaces in balance_iso_date() spec comments
2021-11-14 23:08:49 +00: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
99adb54391
LibJS: Implement Temporal.Calendar.prototype.dateUntil()
2021-10-11 08:31:39 +01:00
Linus Groh
35bba1c98d
LibJS: Convert PlainDate 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
4cb6eaf588
LibJS: Convert parse_temporal_date_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
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
Andreas Kling
6ad427993a
Everywhere: Behaviour => Behavior
2021-09-07 13:53:14 +02:00
Linus Groh
e3254bf4c5
LibJS: Implement Temporal.Calendar.prototype.dateAdd()
2021-08-30 22:33:10 +01:00
Linus Groh
573587b83a
LibJS: Fix logic error in RegulateISODate
2021-08-23 20:54:52 +01:00
Linus Groh
402f04c2fc
LibJS: Implement Temporal.PlainDate.prototype.toString()
2021-08-19 00:14:17 +02:00
Linus Groh
0cdad283c0
LibJS: Reflect Record wording editorial change in the Temporal spec
...
See: https://github.com/tc39/proposal-temporal/commit/c8f14d0
2021-08-17 21:59:35 +01:00
Linus Groh
ed9d37bd40
LibJS: Implement Temporal.Calendar.prototype.yearMonthFromFields()
2021-08-16 14:10:41 +01:00
Andreas Kling
286a7ecd92
LibJS: Call base class visit_edges() in various Temporal objects
...
When overriding visit_edges() in a JS::Object subclass, we must make
sure to call the base class visit_edges(), or the object's Shape (and
any properties) will not get marked.
2021-08-14 20:12:22 +02:00
Linus Groh
e036f4a786
LibJS: Make regulate_iso_date() and iso_date_from_fields() use ISODate
...
No need for TemporalDate, we don't use the calendar field here anyway.
2021-08-05 19:19:40 +02:00
Linus Groh
4640643019
LibJS: Handle ZonedDateTime in ToTemporalDate
2021-08-01 20:31:31 +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
Idan Horowitz
07485802c6
LibJS: Implement Temporal.PlainDate.compare
2021-07-26 16:15:31 +01:00
Idan Horowitz
2c6bd3a61b
LibJS: Use narrower types in Temporal PlainDate/PlainDateTime/Calendar
...
These are bounds-checked during construction of PlainDate/PlainDateTime
and as such theres no need to widen them in these internal AO calls.
2021-07-26 16:15:31 +01:00
Idan Horowitz
8123e957e3
LibJS: Add missing PlainDateTime case in ToTemporalDate
2021-07-23 22:00:23 +01:00
Idan Horowitz
cf78efaef5
LibJS: Implement the ToTemporalDate Abstract Operation
...
This is required by most Temporal.PlainDate.prototype methods.
2021-07-21 22:49:37 +01:00
Idan Horowitz
1e471e2e2f
LibJS: Add Temporal.Calendar.prototype.dateFromFields & required AOs
...
This is required for implementing the DateFromFields PlainDate AO.
2021-07-21 22:49:37 +01:00
Idan Horowitz
cc00ccec41
LibJS: Start implementing Temporal.PlainDate
...
This commit adds the PlainDate object itself, its constructor and
prototype (currently empty), and several required abstract operations.
2021-07-19 09:11:20 +01:00
Idan Horowitz
b816037739
LibJS: Add the ToTemporalInstant Abstract Operation & its requirements
...
This is Abstract Operation is required for the majority of
InstantConstructor's and InstantPrototype's methods.
The implementation is not entirely complete, (specifically 2 of the
underlying required abstract operations, ParseTemporalTimeZoneString
and ParseISODateTime are missing the required lexing, and as such are
TODO()-ed) but the majority of it is done.
2021-07-12 19:05:17 +01:00