mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibJS+LibUnicode: Add "microsecond" and "nanosecond" as sanctioned units
This is a normative change in the ECMA-402 spec. See: https://github.com/tc39/ecma402/commit/f627573
This commit is contained in:
committed by
Linus Groh
parent
8ff0d35386
commit
a5bf32018f
Notes:
sideshowbarker
2024-07-17 18:13:59 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/a5bf32018f Pull-request: https://github.com/SerenityOS/serenity/pull/15108 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/linusg ✅
@@ -40,6 +40,7 @@ constexpr auto sanctioned_single_unit_identifiers()
|
||||
"megabit"sv,
|
||||
"megabyte"sv,
|
||||
"meter"sv,
|
||||
"microsecond"sv,
|
||||
"mile"sv,
|
||||
"mile-scandinavian"sv,
|
||||
"milliliter"sv,
|
||||
@@ -47,6 +48,7 @@ constexpr auto sanctioned_single_unit_identifiers()
|
||||
"millisecond"sv,
|
||||
"minute"sv,
|
||||
"month"sv,
|
||||
"nanosecond"sv,
|
||||
"ounce"sv,
|
||||
"percent"sv,
|
||||
"petabyte"sv,
|
||||
@@ -61,10 +63,4 @@ constexpr auto sanctioned_single_unit_identifiers()
|
||||
};
|
||||
}
|
||||
|
||||
// Additional single units used in ECMAScript required by the Intl.DurationFormat proposal
|
||||
constexpr auto extra_sanctioned_single_unit_identifiers()
|
||||
{
|
||||
return AK::Array { "microsecond"sv, "nanosecond"sv };
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user