1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:07:35 +00:00

LibJS: Make parse_temporal_*_string() take a StringView

The underlying parse_iso8601() function already does this as well.
This commit is contained in:
Linus Groh 2023-01-26 14:22:47 +00:00
parent 82ba940646
commit 90a1de564c
10 changed files with 31 additions and 31 deletions

View file

@ -143,7 +143,7 @@ ThrowCompletionOr<DurationRecord> to_temporal_duration_record(VM& vm, Value temp
// 1. If Type(temporalDurationLike) is not Object, then
if (!temporal_duration_like.is_object()) {
// a. Let string be ? ToString(temporalDurationLike).
auto string = TRY(temporal_duration_like.to_deprecated_string(vm));
auto string = TRY(temporal_duration_like.to_string(vm));
// b. Return ? ParseTemporalDurationString(string).
return parse_temporal_duration_string(vm, string);