Linus Groh
35bba1c98d
LibJS: Convert PlainDate AOs to ThrowCompletionOr
2021-09-17 23:43:01 +02: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
e3254bf4c5
LibJS: Implement Temporal.Calendar.prototype.dateAdd()
2021-08-30 22:33:10 +01:00
Linus Groh
402f04c2fc
LibJS: Implement Temporal.PlainDate.prototype.toString()
2021-08-19 00:14:17 +02:00
Linus Groh
ed9d37bd40
LibJS: Implement Temporal.Calendar.prototype.yearMonthFromFields()
2021-08-16 14:10:41 +01: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
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
Linus Groh
bece2093f2
LibJS: Remove pointless 'explicit' from a couple of constructors
2021-07-22 21:19:40 +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