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
Luke Wilde
d1a5254e41
LibJS: Implement Temporal.PlainDateTime.prototype.round
2021-11-03 19:48:08 +01:00
Luke Wilde
84f79d4c51
LibJS: Implement Temporal.ZonedDateTime.prototype.hoursInDay
2021-11-03 17:55:04 +01:00
Luke Wilde
e42431ec7c
LibJS: Implement Temporal.PlainDateTime.prototype.toJSON
2021-11-03 11:03:30 +01:00
Luke Wilde
2a98b521b4
LibJS: Implement Temporal.PlainDateTime.prototype.toLocaleString
2021-11-03 11:03:30 +01:00
Luke Wilde
b2bbd4d2b8
LibJS: Implement Temporal.PlainDateTime.prototype.toString
2021-11-03 11:03:30 +01:00
Luke Wilde
b83e3fd01d
LibJS: Implement Temporal.PlainTime.prototype.round
2021-11-02 21:42:40 +01:00
Linus Groh
330ac1e5ad
LibJS: Implement Temporal.PlainTime.prototype.toZonedDateTime()
2021-11-02 18:40:37 +01:00
Linus Groh
070f056926
LibJS: Implement Temporal.PlainDateTime.prototype.toZonedDateTime()
2021-11-02 18:40:37 +01:00
Linus Groh
e27bb94038
LibJS: Implement Temporal.PlainDate.prototype.toZonedDateTime()
2021-11-02 18:40:37 +01:00
Linus Groh
0e537e2e1f
LibJS/Tests: Fix arg name in Instant.prototype.toZonedDateTime() test
...
"item", not "items".
2021-11-02 17:51:02 +01:00
Linus Groh
654380c2c2
LibJS: Implement Temporal.PlainDate.prototype.subtract()
2021-11-02 13:29:25 +01:00
Linus Groh
bcd96c80f3
LibJS: Implement Temporal.PlainDate.prototype.add()
2021-11-02 13:29:25 +01:00
Linus Groh
07b0aded99
LibJS: Implement Temporal.PlainDateTime.prototype.subtract()
2021-11-02 09:24:35 +01:00
Linus Groh
c4e371b3da
LibJS: Implement Temporal.PlainDateTime.prototype.add()
2021-11-02 09:24:35 +01:00
Linus Groh
643a2433db
LibJS: Enable Temporal.Calendar.prototype.dateAdd() test that now passes
2021-11-02 09:24:35 +01:00
Luke Wilde
17fd08d752
LibJS: Implement Temporal.PlainTime.prototype.subtract()
...
a
2021-11-01 23:51:23 +01:00
Luke Wilde
4bf391ff4b
LibJS: Implement Temporal.PlainTime.prototype.add()
2021-11-01 23:51:23 +01:00
Linus Groh
97f6c6029f
LibJS: Implement Temporal.TimeZone.prototype.getInstantFor()
2021-11-01 21:39:45 +01:00
Linus Groh
92fdae178b
LibJS: Implement Temporal.TimeZone.prototype.getPreviousTransition()
2021-10-30 16:32:20 +02:00
Linus Groh
e9cbeeac45
LibJS: Implement Temporal.TimeZone.prototype.getNextTransition()
2021-10-30 16:32:20 +02:00
Linus Groh
5fde02184d
LibJS: Implement Temporal.TimeZone.prototype.getPossibleInstantsFor()
2021-10-30 16:32:20 +02:00
Linus Groh
f0281ec19d
LibJS: Implement Temporal.PlainMonthDay.prototype.toPlainDate()
2021-10-11 08:31:39 +01:00