Linus Groh
d764f1c699
LibJS: Convert PlainDateTime 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
576be0f8e7
LibJS: Implement Temporal.Instant.prototype.toString()
2021-08-31 16:35:51 +02:00
Idan Horowitz
28fa4d1568
LibJS: Add the CompareTemporalTime & CompareISODateTime AOs
...
These are required for implementing comparisons between `PlainTime`s and
`PlainDateTime`s.
2021-08-27 16:40:16 +01:00
Linus Groh
ad427f85ca
LibJS: Implement Temporal.PlainDateTime.from()
2021-08-23 20:54:52 +01:00
Linus Groh
321f2c0927
LibJS: Fix types of PlainDateTime iso_{milli,micro,nano}second params
...
999 does not fit into an u8. :^)
2021-07-28 21:57:30 +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
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
61b2780853
LibJS: Fix return type of PlainDateTime::iso_{milli,micro,nano}second()
2021-07-23 08:18:11 +01:00
Linus Groh
4be3196882
LibJS: Start implementing Temporal.PlainDateTime
...
This commit adds the PlainDateTime object itself, its constructor and
prototype (currently empty), and the CreateTemporalDateTime abstract
operation.
2021-07-22 21:19:40 +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