1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:48:11 +00:00
serenity/Userland/Libraries/LibJS/Runtime/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
..
AbstractOperations.cpp LibJS: Implement Temporal.Duration.prototype.toString() 2021-11-07 15:31:28 +01:00
AbstractOperations.h LibJS: Implement Temporal.Duration.prototype.toString() 2021-11-07 15:31:28 +01:00
Calendar.cpp LibJS: Change calendar_date_add() date parameter from PlainDate to Value 2021-11-07 15:31:28 +01:00
Calendar.h LibJS: Change calendar_date_add() date parameter from PlainDate to Value 2021-11-07 15:31:28 +01:00
CalendarConstructor.cpp LibJS: Convert Temporal.Calendar functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
CalendarConstructor.h LibJS: Convert Temporal.Calendar functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
CalendarPrototype.cpp LibJS: Convert Temporal.Calendar functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
CalendarPrototype.h LibJS: Convert Temporal.Calendar functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
Duration.cpp LibJS: Implement Temporal.Duration.prototype.toString() 2021-11-07 15:31:28 +01:00
Duration.h LibJS: Implement Temporal.Duration.prototype.toString() 2021-11-07 15:31:28 +01:00
DurationConstructor.cpp LibJS: Convert Temporal.Duration functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
DurationConstructor.h LibJS: Convert Temporal.Duration functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
DurationPrototype.cpp LibJS: Implement Temporal.Duration.prototype.toLocaleString() 2021-11-07 15:31:28 +01:00
DurationPrototype.h LibJS: Implement Temporal.Duration.prototype.toLocaleString() 2021-11-07 15:31:28 +01:00
Instant.cpp LibJS: Introduce & use FormatISOTimeZoneOffsetString 2021-11-04 16:45:54 +01:00
Instant.h LibJS: Convert Instant AOs to ThrowCompletionOr 2021-09-17 08:25:12 +01:00
InstantConstructor.cpp LibJS: Convert the NumberToBigInt AO to ThrowCompletionOr 2021-10-23 18:01:51 +02:00
InstantConstructor.h LibJS: Convert Temporal.Instant functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
InstantPrototype.cpp LibJS: Convert Temporal.Instant functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
InstantPrototype.h LibJS: Convert Temporal.Instant functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
Now.cpp LibJS: Convert Temporal.Now functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
Now.h LibJS: Convert Temporal.Now functions to ThrowCompletionOr 2021-10-21 22:31:09 +01:00
PlainDate.cpp LibJS: Convert to_string() to ThrowCompletionOr 2021-10-13 09:55:10 +01:00
PlainDate.h LibJS: Implement Temporal.Calendar.prototype.dateUntil() 2021-10-11 08:31:39 +01:00
PlainDateConstructor.cpp LibJS: Convert Temporal.PlainDate functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainDateConstructor.h LibJS: Convert Temporal.PlainDate functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainDatePrototype.cpp LibJS: Change calendar_date_add() date parameter from PlainDate to Value 2021-11-07 15:31:28 +01:00
PlainDatePrototype.h LibJS: Implement Temporal.PlainDate.prototype.toZonedDateTime() 2021-11-02 18:40:37 +01:00
PlainDateTime.cpp LibJS: Change calendar_date_add() date parameter from PlainDate to Value 2021-11-07 15:31:28 +01:00
PlainDateTime.h LibJS: Implement Temporal.PlainDateTime.prototype.toString 2021-11-03 11:03:30 +01:00
PlainDateTimeConstructor.cpp LibJS: Convert Temporal.PlainDateTime functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainDateTimeConstructor.h LibJS: Convert Temporal.PlainDateTime functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainDateTimePrototype.cpp LibJS: Implement Temporal.PlainDateTime.prototype.round 2021-11-03 19:48:08 +01:00
PlainDateTimePrototype.h LibJS: Implement Temporal.PlainDateTime.prototype.round 2021-11-03 19:48:08 +01:00
PlainMonthDay.cpp LibJS: Replace a couple of TODO()'s in Temporal with InternalError 2021-11-04 23:59:40 +01:00
PlainMonthDay.h LibJS: Convert PlainMonthDay AOs to ThrowCompletionOr 2021-09-16 13:53:37 +01:00
PlainMonthDayConstructor.cpp LibJS: Convert Temporal.PlainMonthDay functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainMonthDayConstructor.h LibJS: Convert Temporal.PlainMonthDay functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainMonthDayPrototype.cpp LibJS: Convert Temporal.PlainMonthDay functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainMonthDayPrototype.h LibJS: Convert Temporal.PlainMonthDay functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainTime.cpp LibJS: Update ToTemporalTimeRecord to not require all properties 2021-11-04 16:17:26 +01:00
PlainTime.h LibJS: Implement TODO()'d parts of balance_duration() 2021-11-02 09:24:35 +01:00
PlainTimeConstructor.cpp LibJS: Convert Temporal.PlainTime functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainTimeConstructor.h LibJS: Convert Temporal.PlainTime functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainTimePrototype.cpp LibJS: Move common code into RejectObjectWithCalendarOrTimeZone 2021-11-04 16:17:26 +01:00
PlainTimePrototype.h LibJS: Implement Temporal.PlainTime.prototype.round 2021-11-02 21:42:40 +01:00
PlainYearMonth.cpp LibJS: Convert to_string() to ThrowCompletionOr 2021-10-13 09:55:10 +01:00
PlainYearMonth.h LibJS: Convert PlainYearMonth AOs to ThrowCompletionOr 2021-09-16 13:53:37 +01:00
PlainYearMonthConstructor.cpp LibJS: Convert Temporal.PlainYearMonth functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainYearMonthConstructor.h LibJS: Convert Temporal.PlainYearMonth functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainYearMonthPrototype.cpp LibJS: Convert Temporal.PlainYearMonth functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
PlainYearMonthPrototype.h LibJS: Convert Temporal.PlainYearMonth functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
Temporal.cpp LibJS: Start implementing Temporal.PlainMonthDay 2021-08-15 10:36:36 +01:00
Temporal.h LibJS: Add the Temporal namespace object :^) 2021-07-07 00:42:01 +01:00
TimeZone.cpp LibJS: Fix nanoseconds formatting in format_time_zone_offset_string() 2021-11-07 20:06:28 +00:00
TimeZone.h LibJS: Implement Temporal.ZonedDateTime.prototype.equals 2021-11-07 15:35:16 +02:00
TimeZoneConstructor.cpp LibJS: Convert Temporal.TimeZone functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
TimeZoneConstructor.h LibJS: Convert Temporal.TimeZone functions to ThrowCompletionOr 2021-10-21 22:31:31 +01:00
TimeZonePrototype.cpp LibJS: Implement Temporal.TimeZone.prototype.getInstantFor() 2021-11-01 21:39:45 +01:00
TimeZonePrototype.h LibJS: Implement Temporal.TimeZone.prototype.getInstantFor() 2021-11-01 21:39:45 +01:00
ZonedDateTime.cpp LibJS: Change calendar_date_add() date parameter from PlainDate to Value 2021-11-07 15:31:28 +01:00
ZonedDateTime.h LibJS: Implement ToTemporalZonedDateTime and the required AOs 2021-11-07 15:35:16 +02:00
ZonedDateTimeConstructor.cpp LibJS: Implement Temporal.ZonedDateTime.compare 2021-11-07 15:35:16 +02:00
ZonedDateTimeConstructor.h LibJS: Implement Temporal.ZonedDateTime.compare 2021-11-07 15:35:16 +02:00
ZonedDateTimePrototype.cpp LibJS: Implement Temporal.ZonedDateTime.prototype.equals 2021-11-07 15:35:16 +02:00
ZonedDateTimePrototype.h LibJS: Implement Temporal.ZonedDateTime.prototype.equals 2021-11-07 15:35:16 +02:00