1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-21 09:02:06 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins/Temporal
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
..
Calendar LibJS: Enable Temporal.Calendar.prototype.dateAdd() test that now passes 2021-11-02 09:24:35 +01:00
Duration LibJS: Implement Temporal.Duration.prototype.toLocaleString() 2021-11-07 15:31:28 +01:00
Instant LibJS/Tests: Fix arg name in Instant.prototype.toZonedDateTime() test 2021-11-02 17:51:02 +01:00
Now LibJS: Implement Temporal.Now.zonedDateTimeISO() 2021-08-01 20:31:31 +01:00
PlainDate LibJS: Implement Temporal.PlainDate.prototype.toZonedDateTime() 2021-11-02 18:40:37 +01:00
PlainDateTime LibJS: Implement Temporal.PlainDateTime.prototype.round 2021-11-03 19:48:08 +01:00
PlainMonthDay LibJS: Implement Temporal.PlainMonthDay.prototype.toPlainDate() 2021-10-11 08:31:39 +01:00
PlainTime LibJS: Move common code into RejectObjectWithCalendarOrTimeZone 2021-11-04 16:17:26 +01:00
PlainYearMonth LibJS: Implement Temporal.PlainYearMonth.prototype.toPlainDate() 2021-10-11 08:31:39 +01:00
TimeZone LibJS: Fix nanoseconds formatting in format_time_zone_offset_string() 2021-11-07 20:06:28 +00:00
ZonedDateTime LibJS: Implement Temporal.ZonedDateTime.prototype.equals 2021-11-07 15:35:16 +02:00
Temporal.@@toStringTag.js LibJS: Implement Temporal[@@toStringTag] 2021-07-27 18:48:22 +01:00