1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 05:25:07 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins/Temporal/TimeZone
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
..
TimeZone.from.js LibJS: Implement Temporal.TimeZone.from() 2021-08-01 10:24:38 +01:00
TimeZone.js LibJS/Tests: Add tests for Temporal.TimeZone() constructor 2021-07-08 23:08:27 +01:00
TimeZone.prototype.@@toStringTag.js LibJS: Implement Temporal.TimeZone.prototype[@@toStringTag] 2021-07-08 23:08:27 +01:00
TimeZone.prototype.getInstantFor.js LibJS: Implement Temporal.TimeZone.prototype.getInstantFor() 2021-11-01 21:39:45 +01:00
TimeZone.prototype.getNextTransition.js LibJS: Implement Temporal.TimeZone.prototype.getNextTransition() 2021-10-30 16:32:20 +02:00
TimeZone.prototype.getOffsetNanosecondsFor.js LibJS: Change wording of ErrorType::NotA to be independent of context 2021-09-12 00:16:39 +02:00
TimeZone.prototype.getOffsetStringFor.js LibJS: Change wording of ErrorType::NotA to be independent of context 2021-09-12 00:16:39 +02:00
TimeZone.prototype.getPlainDateTimeFor.js LibJS: Implement Temporal.TimeZone.prototype.getPlainDateTimeFor() 2021-08-01 10:24:38 +01:00
TimeZone.prototype.getPossibleInstantsFor.js LibJS: Implement Temporal.TimeZone.prototype.getPossibleInstantsFor() 2021-10-30 16:32:20 +02:00
TimeZone.prototype.getPreviousTransition.js LibJS: Implement Temporal.TimeZone.prototype.getPreviousTransition() 2021-10-30 16:32:20 +02:00
TimeZone.prototype.id.js LibJS: Implement Temporal.TimeZone.prototype.id 2021-07-08 23:08:27 +01:00
TimeZone.prototype.toJSON.js LibJS: Implement Temporal.TimeZone.prototype.toJSON() 2021-07-08 23:08:27 +01:00
TimeZone.prototype.toString.js LibJS: Fix nanoseconds formatting in format_time_zone_offset_string() 2021-11-07 20:06:28 +00:00