diff options
author | Linus Groh <mail@linusgroh.de> | 2023-01-26 15:54:09 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-26 20:20:54 +0000 |
commit | 453d3063f5b484d46dd6e704b296bb6191ad8f13 (patch) | |
tree | 4cd5f839ee5bf4944916b1f6bc2c7b21b7921595 /Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp | |
parent | 2aa4fcc318d34265522a32661377575700fc64d9 (diff) | |
download | serenity-453d3063f5b484d46dd6e704b296bb6191ad8f13.zip |
LibJS: Port pad_iso_year() to String
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp index c6d26368a4..bf713800ed 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp @@ -264,7 +264,7 @@ ThrowCompletionOr<DeprecatedString> temporal_date_time_to_string(VM& vm, i32 iso auto calendar_string = TRY(maybe_format_calendar_annotation(vm, calendar, show_calendar)); // 9. Return the string-concatenation of year, the code unit 0x002D (HYPHEN-MINUS), month, the code unit 0x002D (HYPHEN-MINUS), day, 0x0054 (LATIN CAPITAL LETTER T), hour, the code unit 0x003A (COLON), minute, seconds, and calendarString. - return DeprecatedString::formatted("{}-{:02}-{:02}T{:02}:{:02}{}{}", pad_iso_year(iso_year), iso_month, iso_day, hour, minute, seconds, calendar_string); + return DeprecatedString::formatted("{}-{:02}-{:02}T{:02}:{:02}{}{}", MUST_OR_THROW_OOM(pad_iso_year(vm, iso_year)), iso_month, iso_day, hour, minute, seconds, calendar_string); } // 5.5.7 CompareISODateTime ( y1, mon1, d1, h1, min1, s1, ms1, mus1, ns1, y2, mon2, d2, h2, min2, s2, ms2, mus2, ns2 ), https://tc39.es/proposal-temporal/#sec-temporal-compareisodatetime |