Linus Groh
de69f5dbf4
LibJS: Implement Temporal.ZonedDateTime.prototype.since()
2021-11-24 17:53:00 +00:00
Linus Groh
7a2eeae8c6
LibJS: Implement Temporal.ZonedDateTime.prototype.until()
2021-11-24 17:53:00 +00:00
Linus Groh
78724fdd33
LibJS: Don't accept UTC designators in strings for plain Temporal types
...
This is a normative change in the Temporal spec.
See: cd2dc7d
2021-11-24 08:56:03 +00:00
Linus Groh
836ce8ee5d
LibJS: Fix parse ErrorType used in parse_temporal_date_string()
...
TemporalInvalidDateString, not TemporalInvalidDateTimeString.
2021-11-24 08:38:50 +00:00
Linus Groh
0619c34703
LibJS: Implement Temporal.PlainDateTime.prototype.since()
2021-11-21 20:04:19 +00:00
Linus Groh
803eddbb62
LibJS: Implement Temporal.PlainDateTime.prototype.until()
2021-11-21 20:04:19 +00:00
Linus Groh
aed444253c
LibJS: Implement Temporal.PlainTime.prototype.since()
2021-11-21 20:04:19 +00:00
Linus Groh
2ac1774fd3
LibJS: Implement Temporal.PlainTime.prototype.until()
2021-11-21 20:04:19 +00:00
Linus Groh
783222f87a
LibJS: Implement parsing of TemporalInstantString
2021-11-20 23:10:09 +00:00
Linus Groh
79a18b058f
LibJS: Implement parsing of TemporalCalendarString
2021-11-20 23:10:09 +00:00
Linus Groh
1583c7257c
LibJS: Implement parsing of TemporalRelativeToString
2021-11-20 23:10:09 +00:00
Linus Groh
98b876ad3f
LibJS: Implement parsing of TemporalZonedDateTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
3b1de431cc
LibJS: Implement parsing of TemporalYearMonthString
2021-11-20 23:10:09 +00:00
Linus Groh
3ddab2f4fe
LibJS: Implement parsing of TemporalMonthDayString
2021-11-20 23:10:09 +00:00
Linus Groh
453c78215c
LibJS: Implement parsing of TemporalTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
b42b7d5f16
LibJS: Implement parsing of TemporalDateTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
02e7de2cba
LibJS: Implement parsing of TemporalDateString
2021-11-20 23:10:09 +00:00
Linus Groh
d0c29c9735
LibJS: Allow string as parameter in Temporal's round() / total()
...
This is a normative change in the Temporal spec.
See: 1f0c586
2021-11-19 11:06:53 +00:00
Linus Groh
ec1e1f4f12
LibJS: Disallow Temporal.Duration input values to be non-integers
...
This is a normative change in the Temporal spec.
See: 8c85450
2021-11-17 22:20:59 +00:00
Luke Wilde
3666d2132b
LibJS: Remove fallback value for get_offset_nanoseconds_for
...
This is a normative change in the Temporal spec.
See: 664f02d
Note that the tests are not comprehensive.
2021-11-17 11:30:13 +00:00
Luke Wilde
ac65fb40d9
LibJS: Implement Temporal.PlainDate.prototype.since
2021-11-16 01:06:07 +00:00
Luke Wilde
ddec3bc888
LibJS: Implement Temporal.PlainDate.prototype.until
2021-11-16 01:06:07 +00:00
Luke Wilde
f6ab63993a
LibJS: Implement Temporal.ZonedDateTime.prototype.round
2021-11-13 19:48:54 +00:00
Linus Groh
dbe70e7c55
LibJS: Implement Temporal.Duration.prototype.total()
2021-11-13 18:50:54 +00:00
Linus Groh
f0cd727d74
LibJS: Fix logic typo in balance_duration() hours calculation
...
By using milliseconds_division_result instead of seconds_division_result
here, the result for hours was off by a factor of 60.
2021-11-13 13:32:35 +00:00
Linus Groh
7f8dc395c1
LibJS: Implement Temporal.ZonedDateTime.prototype.with()
2021-11-13 00:25:40 +00:00
Luke Wilde
f65d25682c
LibJS: Implement Temporal.ZonedDateTime.prototype.subtract
2021-11-12 09:24:36 +00:00
Luke Wilde
9b8524b463
LibJS: Implement Temporal.ZonedDateTime.prototype.add
2021-11-12 09:24:36 +00:00
Luke Wilde
5e3fe52fc4
LibJS: Implement Temporal.Duration.compare
2021-11-11 21:06:54 +00:00
Luke Wilde
5594a492f0
LibJS: Implement Temporal.ZonedDateTime.prototype.toJSON
2021-11-10 12:56:56 +00:00
Luke Wilde
6856b6168a
LibJS: Implement Temporal.ZonedDateTime.prototype.toLocaleString
2021-11-10 12:56:56 +00:00
Luke Wilde
a9ad993e78
LibJS: Implement Temporal.ZonedDateTime.prototype.toString
2021-11-10 12:56:56 +00:00
Linus Groh
1e3e0477cb
LibJS: Implement Temporal.PlainMonthDay.prototype.with()
2021-11-08 22:19:45 +00:00
Linus Groh
fa1d5feec0
LibJS: Implement Temporal.PlainYearMonth.prototype.with()
2021-11-08 22:19:45 +00:00
Linus Groh
aca2ef9e1c
LibJS: Implement Temporal.PlainDateTime.prototype.with()
2021-11-08 22:19:45 +00:00
Linus Groh
c3c9ac93d0
LibJS: Implement Temporal.PlainDate.prototype.with()
...
With one caveat: in the PreparePartialTemporalFields AO I made a change
to fix a spec issue that would require the input object to always have a
month or monthCode property.
This is tracked in https://github.com/tc39/proposal-temporal/issues/1910
and may get accepted as-is, in which case we simply need to remove the
NOTE comment.
2021-11-08 22:19:45 +00:00
Linus Groh
310016aee4
LibJS/Tests: Fix Temporal.PlainDate.prototype.equals() tests
...
Just calling "expect()" doesn't do anything!
2021-11-08 19:12:54 +00:00
Linus Groh
e93ce1ff69
LibJS: Fix nanoseconds formatting in format_time_zone_offset_string()
...
Two issues:
- The format string said "{:9}", which left-pads with spaces and not
zeros as required
- Even when correcting that, we were not accounting for step 11 b:
"Set fraction to the longest possible substring of fraction starting
at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO)."
We can safely use trim() for that as the formatted string is known to
not contain only zeros (which would leave the left-most in place).
Also adds tests for "UTC" and various numeric offsets.
2021-11-07 20:06:28 +00:00
Linus Groh
df2ccb3d38
LibJS: Implement Temporal.Duration.prototype.toLocaleString()
2021-11-07 15:31:28 +01:00
Linus Groh
90fa356b93
LibJS: Implement Temporal.Duration.prototype.toJSON()
2021-11-07 15:31:28 +01:00
Linus Groh
b2548393d2
LibJS: Implement Temporal.Duration.prototype.toString()
...
I hereby claim "implemented largest AO in LibJS ever" (450 lines). :^)
2021-11-07 15:31:28 +01:00
Luke Wilde
706296374b
LibJS: Implement Temporal.ZonedDateTime.prototype.equals
2021-11-07 15:35:16 +02:00
Luke Wilde
ac12581140
LibJS: Implement Temporal.ZonedDateTime.compare
2021-11-07 15:35:16 +02:00
Luke Wilde
c9ec3295d9
LibJS: Implement Temporal.ZonedDateTime.from
2021-11-07 15:35:16 +02:00
Luke Wilde
b8db0ddc70
LibJS: Implement Temporal.ZonedDateTime.prototype.withCalendar
2021-11-05 09:49:47 +01:00
Luke Wilde
58bb73b60f
LibJS: Implement Temporal.ZonedDateTime.prototype.withTimeZone
2021-11-05 09:49:47 +01:00
Luke Wilde
d5f2745a19
LibJS: Implement Temporal.ZonedDateTime.prototype.withPlainDate
2021-11-05 09:49:47 +01:00
Luke Wilde
132a56f07c
LibJS: Implement Temporal.ZonedDateTime.prototype.withPlainTime
2021-11-05 09:49:47 +01:00
Linus Groh
d129e1ff29
LibJS: Move common code into RejectObjectWithCalendarOrTimeZone
...
This is an editorial change in the Temporal spec.
See: 5654fe0
2021-11-04 16:17:26 +01:00
Luke Wilde
c001926752
LibJS: Implement Temporal.ZonedDateTime.prototype.startOfDay
2021-11-04 12:11:33 +01:00