Bug 1799859: Add support for "microsecond" and "nanosecond" units. r=dminor

Steps performed:
- Add "microsecond" and "nanosecond" to "intl/icu/data_filter.json".
- Run "icu_sources_data.py" to update the ICU data file.
- Run "update-tzdata.sh" to reapply the tzdata 2022f changes.
- Add "microsecond" and "nanosecond" to "SanctionedSimpleUnitIdentifiers.yaml".
- Run "make_intl_data.py units" to regenerate additional SpiderMonkey files.

Spec PR: https://github.com/tc39/ecma402/pull/708

Differential Revision: https://phabricator.services.mozilla.com/D161676
This commit is contained in:
André Bargull 2022-11-09 16:45:43 +00:00
Родитель 9d1f26b312
Коммит 7d0125b8c7
9 изменённых файлов: 18 добавлений и 0 удалений

Двоичные данные
config/external/icu/data/icudt71l.dat поставляемый

Двоичный файл не отображается.

Просмотреть файл

@ -42,6 +42,7 @@ inline constexpr SimpleMeasureUnit simpleMeasureUnits[] = {
{"digital", "megabit"},
{"digital", "megabyte"},
{"length", "meter"},
{"duration", "microsecond"},
{"length", "mile"},
{"length", "mile-scandinavian"},
{"volume", "milliliter"},
@ -49,6 +50,7 @@ inline constexpr SimpleMeasureUnit simpleMeasureUnits[] = {
{"duration", "millisecond"},
{"duration", "minute"},
{"duration", "month"},
{"duration", "nanosecond"},
{"mass", "ounce"},
{"concentr", "percent"},
{"digital", "petabyte"},

Просмотреть файл

@ -92,6 +92,7 @@
"+/*/digital/megabit",
"+/*/digital/megabyte",
"+/*/length/meter",
"+/*/duration/microsecond",
"+/*/length/mile",
"+/*/length/mile-scandinavian",
"+/*/volume/milliliter",
@ -99,6 +100,7 @@
"+/*/duration/millisecond",
"+/*/duration/minute",
"+/*/duration/month",
"+/*/duration/nanosecond",
"+/*/mass/ounce",
"+/*/concentr/percent",
"+/*/digital/petabyte",

Просмотреть файл

@ -36,6 +36,7 @@
- megabit
- megabyte
- meter
- microsecond
- mile
- mile-scandinavian
- milliliter
@ -43,6 +44,7 @@
- millisecond
- minute
- month
- nanosecond
- ounce
- percent
- petabyte

Просмотреть файл

@ -32,6 +32,7 @@ var sanctionedSimpleUnitIdentifiers = {
"megabit": true,
"megabyte": true,
"meter": true,
"microsecond": true,
"mile": true,
"mile-scandinavian": true,
"milliliter": true,
@ -39,6 +40,7 @@ var sanctionedSimpleUnitIdentifiers = {
"millisecond": true,
"minute": true,
"month": true,
"nanosecond": true,
"ounce": true,
"percent": true,
"petabyte": true,

Просмотреть файл

@ -651,6 +651,10 @@ skip script test262/intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle-d
skip script test262/built-ins/Date/year-zero.js
skip script test262/built-ins/Date/parse/year-zero.js
# Local test262 copy not yet updated for https://github.com/tc39/test262/pull/3713
skip script test262/intl402/Intl/supportedValuesOf/units.js
skip script test262/intl402/NumberFormat/prototype/format/units-invalid.js
##############################################
# Enable Iterator Helpers tests in the shell #

Просмотреть файл

@ -28,6 +28,7 @@ const sanctionedSimpleUnitIdentifiers = [
"megabit",
"megabyte",
"meter",
"microsecond",
"mile",
"mile-scandinavian",
"milliliter",
@ -35,6 +36,7 @@ const sanctionedSimpleUnitIdentifiers = [
"millisecond",
"minute",
"month",
"nanosecond",
"ounce",
"percent",
"petabyte",

Просмотреть файл

@ -28,6 +28,7 @@ const sanctionedSimpleUnitIdentifiers = [
"megabit",
"megabyte",
"meter",
"microsecond",
"mile",
"mile-scandinavian",
"milliliter",
@ -35,6 +36,7 @@ const sanctionedSimpleUnitIdentifiers = [
"millisecond",
"minute",
"month",
"nanosecond",
"ounce",
"percent",
"petabyte",

Просмотреть файл

@ -28,6 +28,7 @@ const sanctionedSimpleUnitIdentifiers = [
"megabit",
"megabyte",
"meter",
"microsecond",
"mile",
"mile-scandinavian",
"milliliter",
@ -35,6 +36,7 @@ const sanctionedSimpleUnitIdentifiers = [
"millisecond",
"minute",
"month",
"nanosecond",
"ounce",
"percent",
"petabyte",