You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
// https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_diff_out.html#sec-issanctionedsimpleunitidentifier
|
|
export var SANCTIONED_UNITS = [
|
|
'angle-degree',
|
|
'area-acre',
|
|
'area-hectare',
|
|
'concentr-percent',
|
|
'digital-bit',
|
|
'digital-byte',
|
|
'digital-gigabit',
|
|
'digital-gigabyte',
|
|
'digital-kilobit',
|
|
'digital-kilobyte',
|
|
'digital-megabit',
|
|
'digital-megabyte',
|
|
'digital-petabyte',
|
|
'digital-terabit',
|
|
'digital-terabyte',
|
|
'duration-day',
|
|
'duration-hour',
|
|
'duration-millisecond',
|
|
'duration-minute',
|
|
'duration-month',
|
|
'duration-second',
|
|
'duration-week',
|
|
'duration-year',
|
|
'length-centimeter',
|
|
'length-foot',
|
|
'length-inch',
|
|
'length-kilometer',
|
|
'length-meter',
|
|
'length-mile-scandinavian',
|
|
'length-mile',
|
|
'length-millimeter',
|
|
'length-yard',
|
|
'mass-gram',
|
|
'mass-kilogram',
|
|
'mass-ounce',
|
|
'mass-pound',
|
|
'mass-stone',
|
|
'temperature-celsius',
|
|
'temperature-fahrenheit',
|
|
'volume-fluid-ounce',
|
|
'volume-gallon',
|
|
'volume-liter',
|
|
'volume-milliliter',
|
|
];
|
|
// In CLDR, the unit name always follows the form `namespace-unit` pattern.
|
|
// For example: `digital-bit` instead of `bit`. This function removes the namespace prefix.
|
|
export function removeUnitNamespace(unit) {
|
|
return unit.replace(/^(.*?)-/, '');
|
|
}
|
|
//# sourceMappingURL=units.js.map
|