Commit graph

97 commits

Author SHA1 Message Date
Linus Groh
ed9d37bd40 LibJS: Implement Temporal.Calendar.prototype.yearMonthFromFields() 2021-08-16 14:10:41 +01:00
Linus Groh
b76bae13fd LibJS: Handle PlainMonthDay in ISO{Year,Month,MonthCode,Day} 2021-08-15 10:36:36 +01:00
Linus Groh
ec00d4729a LibJS: Handle PlainMonthDay in GetTemporalCalendarWithISODefault 2021-08-15 10:36:36 +01:00
Linus Groh
1e54e37228 LibJS: Handle PlainMonthDay in ToTemporalCalendar 2021-08-15 10:36:36 +01:00
davidot
151447bdf7 LibJS: Move Object::invoke to Value::invoke and fix it for primitives
This is a tiny difference and only changes anything for primitives in
strict mode. However this is tested in test262 and can be noticed by
overriding toString of primitive values.

This does now require one to wrap an object in a Value to call invoke
but all code using invoke has been migrated.
2021-08-09 17:33:14 +01:00
Linus Groh
e2f016dc81 LibJS: Handle PlainYearMonth in ISO{Year,Month,MonthCode,Day} 2021-08-08 17:45:06 +01:00
Linus Groh
4ba5df7145 LibJS: Handle PlainYearMonth in GetTemporalCalendarWithISODefault 2021-08-08 17:45:06 +01:00
Linus Groh
2aec6653c4 LibJS: Handle PlainYearMonth in ToTemporalCalendar 2021-08-08 17:45:06 +01:00
Linus Groh
5b12542d39 LibJS: Fix Vector<Value> => MarkedValueList in calendar_fields()
We need to ensure the temporary PrimitiveString cells don't get GC'd.
2021-08-08 17:45:06 +01:00
Linus Groh
16c38788c3 LibJS: Add missing spec links 2021-08-08 11:04:30 +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
fa0d6d1045 LibJS: Handle ZonedDateTime in GetTemporalCalendarWithISODefault 2021-08-01 20:31:31 +01:00
Linus Groh
14e7eff43f LibJS: Handle ZonedDateTime in ToTemporalCalendar 2021-08-01 20:31:31 +01:00
Idan Horowitz
010761aff4 LibJS: Implement Temporal.PlainDateTime.prototype.withPlainDate 2021-07-31 00:16:41 +01:00
Linus Groh
4e4d8d6905 LibJS: Reflect infallibility editorial changes in the Temporal spec
See:

- https://github.com/tc39/proposal-temporal/commit/3c0671f
- https://github.com/tc39/proposal-temporal/commit/fe28b86
2021-07-28 23:48:56 +01:00
Linus Groh
817be1b292 LibJS: Handle PlainTime objects in GetTemporalCalendarWithISODefault 2021-07-28 21:57:30 +01:00
Linus Groh
c2d45e5a83 LibJS: Handle PlainTime objects in ToTemporalCalendar 2021-07-28 21:57:30 +01:00
Linus Groh
d84fd3ad5c LibJS: Reflect infallibility editorial change in ToTemporalCalendar
See: https://github.com/tc39/proposal-temporal/commit/3437106
2021-07-28 21:57:30 +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
d428787e18 LibJS: Handle PlainDateTime objects in GetTemporalCalendarWithISODefault 2021-07-25 23:44:36 +01:00
Linus Groh
c1005dbb0a LibJS: Handle PlainDateTime objects ToTemporalCalendar 2021-07-25 23:44:36 +01:00
Idan Horowitz
1d76be97f5 LibJS: Implement Temporal.PlainDate.prototype.inLeapYear 2021-07-23 22:00:23 +01:00
Idan Horowitz
dd15fc471c LibJS: Implement Temporal.PlainDate.prototype.monthsInYear 2021-07-23 22:00:23 +01:00
Idan Horowitz
b1dd09840b LibJS: Implement Temporal.PlainDate.prototype.daysInYear 2021-07-23 22:00:23 +01:00
Idan Horowitz
3160540d0e LibJS: Implement Temporal.PlainDate.prototype.daysInMonth 2021-07-23 22:00:23 +01:00
Idan Horowitz
2150f5b374 LibJS: Implement Temporal.PlainDate.prototype.daysInWeek 2021-07-23 22:00:23 +01:00
Idan Horowitz
2cf582436f LibJS: Implement Temporal.PlainDate.prototype.weekOfYear 2021-07-23 22:00:23 +01:00
Idan Horowitz
d22fe25643 LibJS: Implement Temporal.Calendar.prototype.weekOfYear 2021-07-23 22:00:23 +01:00
Idan Horowitz
d561535ac9 LibJS: Implement Temporal.PlainDate.prototype.dayOfYear 2021-07-23 22:00:23 +01:00
Idan Horowitz
c0e7761758 LibJS: Implement Temporal.Calendar.prototype.dayOfYear 2021-07-23 22:00:23 +01:00
Idan Horowitz
bcbfd5b280 LibJS: Implement Temporal.PlainDate.prototype.dayOfWeek 2021-07-23 22:00:23 +01:00
Idan Horowitz
339b0a17e8 LibJS: Implement Temporal.Calendar.prototype.dayOfWeek 2021-07-23 22:00:23 +01:00
Idan Horowitz
59dc0e8421 LibJS: Implement Temporal.PlainDate.prototype.day 2021-07-23 22:00:23 +01:00
Idan Horowitz
8a20f258f0 LibJS: Implement Temporal.Calendar.prototype.day 2021-07-23 22:00:23 +01:00
Idan Horowitz
d9414e465a LibJS: Implement Temporal.PlainDate.prototype.monthCode 2021-07-23 22:00:23 +01:00
Idan Horowitz
9d9ba29cae LibJS: Implement Temporal.Calendar.prototype.monthCode 2021-07-23 22:00:23 +01:00
Idan Horowitz
a0af9b11fb LibJS: Implement Temporal.PlainDate.prototype.month 2021-07-23 22:00:23 +01:00
Idan Horowitz
3bec18432a LibJS: Implement Temporal.Calendar.prototype.month 2021-07-23 22:00:23 +01:00
Idan Horowitz
8434ca6c4b LibJS: Implement Temporal.PlainDate.prototype.year 2021-07-23 22:00:23 +01:00
Idan Horowitz
3895a8354d LibJS: Implement Temporal.Calendar.prototype.year 2021-07-23 22:00:23 +01:00
Idan Horowitz
d804ce830d LibJS: Implement Temporal.PlainDate.prototype.equals & Required AO 2021-07-21 22:49:37 +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
44c8e158c1 LibJS: Remove usages of String's null state in Temporal AOs 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
Linus Groh
a2f1d79765 LibJS: Start implementing Temporal.Calendar
Just like the previous Temporal.{Instant,TimeZone} commits, this patch
adds the Calendar object itself, its constructor and prototype
(currently empty), and two required abstract operations.
2021-07-14 23:50:03 +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