Commit graph

61 commits

Author SHA1 Message Date
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
Luke Wilde
ac67077b57 LibJS: Fix length of PlainDateTime.withPlainTime
withPlainTime's argument is optional, so the length of the function is
actually 0.
2022-11-03 21:09:58 +00:00
Luke Wilde
4a167cfbec LibJS: Add calendarName: "critical" option to toString() methods
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/e715a50
2022-11-03 19:15:50 +00: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
569c2dc1d0 LibJS: Adjust order of operations in ISO{Date,MonthDay}FromFields
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/7dd90dc
2022-06-15 17:49:20 +01:00
Linus Groh
54af3a5396 LibJS: Adjust grammar for DateExtendedYear to exclude -000000
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/fb3e656

We lose the custom error message, but it's not the end of the world.
2022-03-10 23:20:39 +01:00
Linus Groh
2434d34644 LibJS/Tests: Add tests for '−000000' (U+2212) DateExtendedYear
I noticed we only have coverage for this with the ASCII minus sign in
our own test suite.
2022-03-09 22:08:15 +01:00
Linus Groh
19a2b32065 LibJS: Reject '-000000' as extended year
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/e60ef9e
2022-02-02 14:46:52 +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: https://github.com/tc39/proposal-temporal/commit/cd2dc7d
2021-11-24 08:56:03 +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
1583c7257c LibJS: Implement parsing of TemporalRelativeToString 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: https://github.com/tc39/proposal-temporal/commit/1f0c586
2021-11-19 11:06:53 +00:00
Luke Wilde
3666d2132b LibJS: Remove fallback value for get_offset_nanoseconds_for
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/664f02d

Note that the tests are not comprehensive.
2021-11-17 11:30:13 +00:00
Linus Groh
aca2ef9e1c LibJS: Implement Temporal.PlainDateTime.prototype.with() 2021-11-08 22:19:45 +00:00
Luke Wilde
d1a5254e41 LibJS: Implement Temporal.PlainDateTime.prototype.round 2021-11-03 19:48:08 +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
Linus Groh
070f056926 LibJS: Implement Temporal.PlainDateTime.prototype.toZonedDateTime() 2021-11-02 18:40:37 +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
Timothy Flynn
76589d6728 LibJS: Change wording of ErrorType::NotA to be independent of context
Currently, we have NotA and NotAn, to be used dependent on whether the
following word begins with a vowel or not. To avoid this, change the
wording on NotA to be independent of this context.
2021-09-12 00:16:39 +02:00
Linus Groh
f2f671f340 LibJS: Implement Temporal.PlainDateTime.prototype.eraYear 2021-08-27 23:36:52 +01:00
Linus Groh
276d3f5089 LibJS: Implement Temporal.PlainDateTime.prototype.era 2021-08-27 23:36:52 +01:00
Idan Horowitz
24dbf18936 LibJS: Implement Temporal.PlainDateTime.prototype.withPlainTime() 2021-08-27 19:01:30 +01:00
Idan Horowitz
32fc81c186 LibJS: Implement Temporal.PlainDateTime.prototype.equals() 2021-08-27 16:40:16 +01:00
Idan Horowitz
9ed877e8e7 LibJS: Implement Temporal.PlainDateTime.compare() 2021-08-27 16:40:16 +01:00
Linus Groh
fc58f93734 LibJS: Implement Temporal.PlainDateTime.prototype.toPlainMonthDay() 2021-08-24 01:53:30 +02:00
Linus Groh
5573efa3bd LibJS: Implement Temporal.PlainDateTime.prototype.toPlainYearMonth() 2021-08-24 01:53:30 +02:00
Linus Groh
ad427f85ca LibJS: Implement Temporal.PlainDateTime.from() 2021-08-23 20:54:52 +01:00
Linus Groh
a8ba2f4b21 LibJS/Tests: Fix bad copy and paste that crept into a lot of tests
The top-level function should have been `describe()``, but instead it's
been nested `test()`s.
2021-08-07 12:10:34 +01:00
Idan Horowitz
64a98d0f90 LibJS: Implement Temporal.PlainDateTime.prototype.toPlainTime 2021-07-31 00:16:41 +01:00
Idan Horowitz
010761aff4 LibJS: Implement Temporal.PlainDateTime.prototype.withPlainDate 2021-07-31 00:16:41 +01:00
Idan Horowitz
f657c86d58 LibJS: Implement Temporal.PlainDateTime.prototype.withCalendar 2021-07-31 00:16:41 +01:00
Idan Horowitz
8f9b4a5ea6 LibJS: Implement Temporal.PlainDateTime.prototype.inLeapYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
b9ed19c850 LibJS: Implement Temporal.PlainDateTime.prototype.monthsInYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
fb5c0ed0d0 LibJS: Implement Temporal.PlainDateTime.prototype.daysInYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
2d86cbae45 LibJS: Implement Temporal.PlainDateTime.prototype.daysInMonth 2021-07-29 22:47:56 +01:00
Idan Horowitz
01d33174c8 LibJS: Implement Temporal.PlainDateTime.prototype.daysInWeek 2021-07-29 22:47:56 +01:00
Idan Horowitz
d4e9d572f5 LibJS: Implement Temporal.PlainDateTime.prototype.weekOfYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
0800c2a958 LibJS: Implement Temporal.PlainDateTime.prototype.dayOfYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
c41b7b27c9 LibJS: Implement Temporal.PlainDateTime.prototype.dayOfWeek 2021-07-29 22:47:56 +01:00
Idan Horowitz
518a9f3eab LibJS: Implement Temporal.PlainDateTime.prototype.nanosecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
23bf840326 LibJS: Implement Temporal.PlainDateTime.prototype.microsecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
b2f66a06ac LibJS: Implement Temporal.PlainDateTime.prototype.millisecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
3fdb314a39 LibJS: Implement Temporal.PlainDateTime.prototype.second 2021-07-29 22:47:56 +01:00
Idan Horowitz
6dd0815fad LibJS: Implement Temporal.PlainDateTime.prototype.minute 2021-07-29 22:47:56 +01:00
Idan Horowitz
f553ab3104 LibJS: Implement Temporal.PlainDateTime.prototype.hour 2021-07-29 22:47:56 +01:00
Idan Horowitz
f93b6ea58c LibJS: Implement Temporal.PlainDateTime.prototype.day 2021-07-29 22:47:56 +01:00