mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibJS: Change LargerOfTwoTemporalUnits AO to return a StringView
This commit is contained in:
parent
2cea4ad508
commit
1039159a6c
7 changed files with 9 additions and 9 deletions
|
@ -764,7 +764,7 @@ ThrowCompletionOr<void> validate_temporal_unit_range(GlobalObject& global_object
|
|||
}
|
||||
|
||||
// 13.23 LargerOfTwoTemporalUnits ( u1, u2 ), https://tc39.es/proposal-temporal/#sec-temporal-largeroftwotemporalunits
|
||||
String larger_of_two_temporal_units(StringView unit1, StringView unit2)
|
||||
StringView larger_of_two_temporal_units(StringView unit1, StringView unit2)
|
||||
{
|
||||
// 1. If either u1 or u2 is "year", return "year".
|
||||
if (unit1 == "year"sv || unit2 == "year"sv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue