Skip to content

Commit

Permalink
Bug 1799859: Add support for "microsecond" and "nanosecond" units. r=…
Browse files Browse the repository at this point in the history
…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: tc39/ecma402#708

Differential Revision: https://phabricator.services.mozilla.com/D161676
  • Loading branch information
anba committed Nov 9, 2022
1 parent 962de84 commit 1f334cd
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 0 deletions.
Binary file modified config/external/icu/data/icudt71l.dat
Binary file not shown.
2 changes: 2 additions & 0 deletions intl/components/src/MeasureUnitGenerated.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ inline constexpr SimpleMeasureUnit simpleMeasureUnits[] = {
{"digital", "megabit"},
{"digital", "megabyte"},
{"length", "meter"},
{"duration", "microsecond"},
{"length", "mile"},
{"length", "mile-scandinavian"},
{"volume", "milliliter"},
{"length", "millimeter"},
{"duration", "millisecond"},
{"duration", "minute"},
{"duration", "month"},
{"duration", "nanosecond"},
{"mass", "ounce"},
{"concentr", "percent"},
{"digital", "petabyte"},
Expand Down
2 changes: 2 additions & 0 deletions intl/icu/data_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@
"+/*/digital/megabit",
"+/*/digital/megabyte",
"+/*/length/meter",
"+/*/duration/microsecond",
"+/*/length/mile",
"+/*/length/mile-scandinavian",
"+/*/volume/milliliter",
"+/*/length/millimeter",
"+/*/duration/millisecond",
"+/*/duration/minute",
"+/*/duration/month",
"+/*/duration/nanosecond",
"+/*/mass/ounce",
"+/*/concentr/percent",
"+/*/digital/petabyte",
Expand Down
2 changes: 2 additions & 0 deletions js/src/builtin/intl/SanctionedSimpleUnitIdentifiers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@
- megabit
- megabyte
- meter
- microsecond
- mile
- mile-scandinavian
- milliliter
- millimeter
- millisecond
- minute
- month
- nanosecond
- ounce
- percent
- petabyte
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions js/src/tests/jstests.list
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ const sanctionedSimpleUnitIdentifiers = [
"megabit",
"megabyte",
"meter",
"microsecond",
"mile",
"mile-scandinavian",
"milliliter",
"millimeter",
"millisecond",
"minute",
"month",
"nanosecond",
"ounce",
"percent",
"petabyte",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ const sanctionedSimpleUnitIdentifiers = [
"megabit",
"megabyte",
"meter",
"microsecond",
"mile",
"mile-scandinavian",
"milliliter",
"millimeter",
"millisecond",
"minute",
"month",
"nanosecond",
"ounce",
"percent",
"petabyte",
Expand Down
2 changes: 2 additions & 0 deletions js/src/tests/non262/Intl/NumberFormat/unit-well-formed.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ const sanctionedSimpleUnitIdentifiers = [
"megabit",
"megabyte",
"meter",
"microsecond",
"mile",
"mile-scandinavian",
"milliliter",
"millimeter",
"millisecond",
"minute",
"month",
"nanosecond",
"ounce",
"percent",
"petabyte",
Expand Down

0 comments on commit 1f334cd

Please sign in to comment.