MacDue
63b11030f0
Everywhere: Use ReadonlySpan<T> instead of Span<T const>
2023-02-08 19:15:45 +00:00
Linus Groh
b09522312c
LibJS: Port iso_month_code() to String
2023-01-26 20:20:54 +00:00
Linus Groh
bcca5efd5a
LibJS: Port format_calendar_annotation() to String
2023-01-26 20:20:54 +00:00
Linus Groh
269f3c4105
LibJS: Port maybe_format_calendar_annotation() to String
2023-01-26 20:20:54 +00:00
Linus Groh
627291b075
LibJS: Port calendar_month_code() to String
2023-01-26 20:20:54 +00:00
Linus Groh
46cff34baf
LibJS: Port get_builtin_calendar() to String
2023-01-26 20:20:54 +00:00
Linus Groh
a101b15ad0
LibJS: Port create_temporal_calendar() to String
2023-01-26 20:20:54 +00:00
Linus Groh
ef389c086d
LibJS: Port parse_temporal_calendar_string()
...
Also make is_builtin_calendar() take a StringView as part of this, it
only does equality checks.
2023-01-26 20:20:54 +00:00
Linus Groh
227379a1da
LibJS: Port prepare_temporal_fields() and calendar_fields() to String
2023-01-26 20:20:54 +00:00
BodilessSleeper
8e6920a18d
LibJS: Convert calendar operation results to floats
...
This commit ticks away one of the boxes in #15525
Temporal commit: tc39/proposal-temporal@11aad40
2023-01-05 19:49:09 +01:00
BodilessSleeper
84db0c8dbf
LibJS: Remove call to ToPositiveInteger after CalendarDaysInMonth
...
Implements: tc39/proposal-temporal@261692a
In order to remove the call to to_positive_integer() there neeeded
to be a change of return type from ThrowCompletionOr<Value> to
ThrowCompletionOr<double>.
This is one of the changes that will come anyways with the following
commit: tc39/proposal-temporal@11aad40 . :^)
2022-12-31 00:05:20 +01:00
Luke Wilde
fa1416987a
LibJS: Add yearOfWeek calendar methods and properties
...
This is a normative change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/7fa4d18
- https://github.com/tc39/proposal-temporal/commit/caa941d
2022-12-26 09:30:36 +01:00
Linus Groh
6e19ab2bbc
AK+Everywhere: Rename String to DeprecatedString
...
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
Moustafa Raafat
092b33c96e
LibJS: Remove trivial operations ISO{Year,Month,Day}
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/606d8a2
2022-10-19 22:39:33 +02:00
Moustafa Raafat
48cc557dfa
LibJS: Merge ISOMonthCode and BuildISOMonthCode
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/a4d17b1
2022-10-19 22:39:33 +02:00
Andreas Kling
35c9aa7c05
LibJS: Hide all the constructors!
...
Now that the GC allocator is able to invoke Cell subclass constructors
directly via friendship, we no longer need to keep them public. :^)
2022-08-29 03:24:54 +02:00
Linus Groh
36225c0ae7
LibJS: Allow undefined for calendar in MaybeFormatCalendarAnnotation
...
This is an editorial change in the Temporal spec.
Now that this is spec'd as either an Object or undefined, we can change
the parameter type from arbitrary JS::Value to JS::Object*.
See: https://github.com/tc39/proposal-temporal/commit/cdfcffd
2022-08-25 23:41:09 +01:00
Linus Groh
741cc08221
LibJS: Use fully spec'd algorithm for ToISOWeekOfYear
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/33b62a3
2022-08-25 23:41:09 +01:00
Luke Wilde
54bb6bf2c0
LibJS: Avoid calling ToString on calendar when calendarName is "never"
...
This is a normative change in the Temporal spec.
See:
- https://github.com/tc39/proposal-temporal/commit/6122f4e
- https://github.com/tc39/proposal-temporal/commit/cf586bc
2022-08-25 21:11:23 +01:00
Linus Groh
694f66b5ca
LibJS: Replace GlobalObject with VM in Temporal AOs [Part 2/19]
2022-08-23 13:58:30 +01:00
Linus Groh
7a8e6cf6c6
LibJS: Move MergeLists into non-Temporal ECMA-262 amendments
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/4ce3db1
2022-06-18 13:54:46 +01:00
Linus Groh
0c3d2b656e
LibJS: Rename CalendarMergeFieldNames to MergeLists
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/bebf467
2022-06-18 13:54:46 +01:00
Linus Groh
3025f77991
LibJS: Add an explicit operation for merging calendar field names
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/2bd7977
2022-06-15 17:49:20 +01:00
Linus Groh
86e22abd76
LibJS: Rename DefaultMergeFields to DefaultMergeCalendarFields
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/0ee80b2
2022-06-10 12:39:11 +02:00
Linus Groh
d2c1dd5454
LibJS: Introduce ISO Date Records
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/d264341
2022-05-16 20:46:46 +01:00
Linus Groh
fc6cf3cb9d
LibJS: Remove ToISODayOfWeek
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/3eab7e4
2022-05-08 00:07:58 +02:00
Linus Groh
cabcdd838b
LibJS: Remove ToISODayOfYear
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6117d90
2022-05-08 00:07:58 +02:00
Linus Groh
a216c0b6df
LibJS: Remove IsISOLeapYear
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/a36bdd4
2022-05-08 00:07:58 +02:00
Linus Groh
6d0d7c8fd0
LibJS: Remove ISODaysInYear
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/f62e737
2022-05-08 00:07:58 +02:00
Linus Groh
aac457755d
LibJS: Define IsBuiltinCalendar in terms of AvailableCalendars
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/896b72d
2022-04-29 22:40:46 +02:00
Linus Groh
2499911898
LibJS: Rename DateFromFields to CalendarDateFromFields, etc
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/fd27b54
2022-04-29 22:40:46 +02:00
Linus Groh
151eb8606d
LibJS: Consistently call observable Temporal AOs with undefined options
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6fa5b9d
2022-04-07 12:58:39 +01:00
Linus Groh
cfb04765fa
LibJS: Correct PlainYearMonth arithmetic for non-ISO calendars
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/61e8dd0
2022-03-31 17:09:10 +01:00
Luke Wilde
29072f4b09
LibJS: Implement the required AOs for Temporal.Duration.compare
2021-11-11 21:06:54 +00:00
Linus Groh
36b51276d5
LibJS: Change calendar_date_add() date parameter from PlainDate to Value
...
Turns out use of this AO is a bit more flexible than I anticipated.
2021-11-07 15:31:28 +01:00
Linus Groh
d49bbb1da3
LibJS: Implement TODO()'d parts of balance_duration()
...
Massive :yakstack:, so I understand why it was skipped in the first
place :^)
2021-11-02 09:24:35 +01:00
Linus Groh
97f6c6029f
LibJS: Implement Temporal.TimeZone.prototype.getInstantFor()
2021-11-01 21:39:45 +01:00
Linus Groh
2c222ba40b
LibJS: Implement Temporal.PlainYearMonth.prototype.toPlainDate()
2021-10-11 08:31:39 +01:00
Linus Groh
f8d92232c8
LibJS: Convert Calendar AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01:00
Linus Groh
4e5becf36e
LibJS: Make default_merge_fields() {additional_,}fields Object a const&
...
This only calls Object::{get,enumerable_own_property_names}() on the
fields and additional_fields Objects, both of which are const-qualified.
2021-09-09 23:46:45 +01:00
Linus Groh
4bba61fd59
LibJS: Make resolve_iso_month() fields Object a const&
...
This only calls Object::get() on the fields Object, which is
const-qualified.
2021-09-09 23:46:45 +01:00
Linus Groh
1f99538185
LibJS: Make Temporal foo_from_fields() AO field/options Object a const*
...
This is a bit of a lie as the Value(Object const*) ctor will const_cast
them in invoke(), but at least it ensures that nothing else in the
function relies on getting non-const Objects.
Perhaps we can have an actual Object const* Value in the future as well.
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
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
402f04c2fc
LibJS: Implement Temporal.PlainDate.prototype.toString()
2021-08-19 00:14:17 +02:00
Linus Groh
1292d80b93
LibJS: Implement Temporal.Calendar.prototype.mergeFields()
2021-08-17 00:26:19 +01:00
Linus Groh
795e077eb8
LibJS: Implement Temporal.PlainDate.prototype.toPlainMonthDay()
2021-08-16 20:40:21 +01:00
Linus Groh
31f65b8c50
LibJS: Implement Temporal.Calendar.prototype.monthDayFromFields()
2021-08-16 20:40:21 +01:00
Linus Groh
6709c915aa
LibJS: Implement Temporal.PlainDate.prototype.toPlainYearMonth()
2021-08-16 14:10:41 +01:00